Fix grouping of local and non-local podcasts in playqueue

This commit is contained in:
craig.p.drummond
2014-07-17 16:13:20 +00:00
committed by craig.p.drummond
parent ca8d63c4c4
commit e756049113
2 changed files with 12 additions and 2 deletions

View File

@@ -187,6 +187,11 @@ QByteArray HttpServer::encodeUrl(const Song &s)
if (s.track) {
query.addQueryItem("track", QString::number(s.track));
}
#ifdef ENABLE_ONLINE_SERVICES
if (s.isFromOnlineService()) {
query.addQueryItem("onlineservice", s.onlineService());
}
#endif
query.addQueryItem("id", QString::number(s.id));
query.addQueryItem("cantata", "song");
#if QT_VERSION >= 0x050000
@@ -278,6 +283,11 @@ Song HttpServer::decodeUrl(const QUrl &url) const
if (q.hasQueryItem("id")) {
s.id=q.queryItemValue("id").toInt();
}
#ifdef ENABLE_ONLINE_SERVICES
if (q.hasQueryItem("onlineservice")) {
s.setIsFromOnlineService(q.queryItemValue("onlineservice"));
}
#endif
s.file=url.path();
s.type=Song::CantataStream;
#ifdef Q_OS_WIN

View File

@@ -477,7 +477,7 @@ QString Song::artistSong() const
QString Song::trackAndTitleStr(bool showArtistIfDifferent) const
{
#if !defined CANTATA_NO_UI_FUNCTIONS && defined ENABLE_ONLINE_SERVICES
if (OnlineSvrTrack==type && OnlineService::showLogoAsCover(*this)) {
if ((OnlineSvrTrack==type || Song::CantataStream) && OnlineService::showLogoAsCover(*this)) {
return artistSong();
}
#endif
@@ -626,7 +626,7 @@ bool Song::capitalise()
QString Song::albumKey() const
{
#if !defined CANTATA_NO_UI_FUNCTIONS && defined ENABLE_ONLINE_SERVICES
if (OnlineSvrTrack==type && OnlineService::showLogoAsCover(*this)) {
if ((OnlineSvrTrack==type || Song::CantataStream) && OnlineService::showLogoAsCover(*this)) {
return onlineService();
}
#endif