Keep stream's full filepath - so that undo/redo works on playqueue

This commit is contained in:
craig.p.drummond
2014-01-15 19:32:44 +00:00
committed by craig.p.drummond
parent fefe4ab9b9
commit 2cc84fab28
3 changed files with 27 additions and 6 deletions

View File

@@ -251,6 +251,8 @@ Song MPDParseUtils::parseSong(const QByteArray &data, bool isPlayQueue)
song.genre = i18n("Unknown");
}
QString origFile=song.file;
#ifdef ENABLE_HTTP_SERVER
if (!song.file.isEmpty() && song.file.startsWith("http") && HttpServer::self()->isOurs(song.file)) {
song.type=Song::CantataStream;
@@ -297,6 +299,9 @@ Song MPDParseUtils::parseSong(const QByteArray &data, bool isPlayQueue)
}
}
if (isPlayQueue) {
// HTTP server, and OnlineServices, modify the path. But this then messes up
// undo/restore of playqueue. Therefore, set path back to original value...
song.file=origFile;
song.setKey();
}
return song;