forked-daapd does not generate valid play queue IDs
This commit is contained in:
committed by
Wolfgang Scherer
parent
bff60d1a6e
commit
243235cefa
@@ -878,7 +878,8 @@ void PlayQueueModel::update(const QList<Song> &songList, bool isComplete)
|
||||
}
|
||||
|
||||
// If we have too many changes UI can hang, so it is sometimes better just to do a complete reset!
|
||||
if (isComplete && songs.count()>MPDConnection::constMaxPqChanges) {
|
||||
if (isComplete && (songs.count()>MPDConnection::constMaxPqChanges
|
||||
|| !MPDConnection::self()->isPlayQueueIdValid())) {
|
||||
songs.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -1048,7 +1048,7 @@ void MPDConnection::playListChanges()
|
||||
QByteArray data = "plchangesposid "+quote(lastUpdatePlayQueueVersion);
|
||||
Response status=sendCommand("status"); // We need an updated status so as to detect deletes at end of list...
|
||||
Response response=sendCommand(data, false);
|
||||
if (response.ok && status.ok) {
|
||||
if (response.ok && status.ok && isPlayQueueIdValid()) {
|
||||
MPDStatusValues sv=MPDParseUtils::parseStatus(status.data);
|
||||
lastUpdatePlayQueueVersion=lastStatusPlayQueueVersion=sv.playlist;
|
||||
emitStatusUpdated(sv);
|
||||
@@ -2532,7 +2532,7 @@ void MPDServerInfo::detect(void) {
|
||||
serverName = "unknown";
|
||||
}
|
||||
|
||||
DBUG << "detected serverType: " << getServerName() << "(" << getServerType() << ")";
|
||||
DBUG << "detected serverType:" << getServerName() << "(" << getServerType() << ")";
|
||||
|
||||
if (isMopidy()) {
|
||||
topLevelLsinfo = "lsinfo \"Local media\"";
|
||||
|
||||
@@ -191,6 +191,7 @@ public:
|
||||
bool isMpd(void) const { return serverType == Mpd; }
|
||||
bool isMopidy(void) const { return serverType == Mopidy; }
|
||||
bool isForkedDaapd(void) const { return serverType == ForkedDaapd; }
|
||||
bool isPlayQueueIdValid(void) const { return serverType != ForkedDaapd; }
|
||||
|
||||
const QString &getServerName(void) const { return serverName;}
|
||||
const QByteArray &getTopLevelLsinfo(void) const { return topLevelLsinfo; }
|
||||
@@ -281,6 +282,7 @@ public:
|
||||
bool isMpd(void) const { return serverInfo.isMpd(); }
|
||||
bool isMopidy(void) const { return serverInfo.isMopidy(); }
|
||||
bool isForkedDaapd(void) const { return serverInfo.isForkedDaapd(); }
|
||||
bool isPlayQueueIdValid(void) const { return serverInfo.isPlayQueueIdValid(); }
|
||||
void setVolumeFadeDuration(int f) { fadeDuration=f; }
|
||||
QString ipAddress() const { return details.isLocal() ? QString() : sock.address(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user