diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-01-01 15:49:41 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-01-01 15:49:41 +0000 |
| commit | 6e2baebcf5e60ea97697b099814c4a99f82100dc (patch) | |
| tree | 36cd3ed26d8ff0aca19ef601e4e4bad17e5d85f1 /src/plugins | |
| parent | bcf5e290508d81d21e6e6f5ce79483390ac926d0 (diff) | |
| download | qmmp-6e2baebcf5e60ea97697b099814c4a99f82100dc.tar.gz qmmp-6e2baebcf5e60ea97697b099814c4a99f82100dc.tar.bz2 qmmp-6e2baebcf5e60ea97697b099814c4a99f82100dc.zip | |
mpris2: fixed url
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3114 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/General/mpris/mpris2/player2object.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp index 94ecca20f..f5af555e6 100644 --- a/src/plugins/General/mpris/mpris2/player2object.cpp +++ b/src/plugins/General/mpris/mpris2/player2object.cpp @@ -126,8 +126,8 @@ QVariantMap Player2Object::metadata() const map["mpris:length"] = qMax(m_core->totalTime() * 1000 , qint64(0)); if(!MetaDataManager::instance()->getCoverPath(m_core->metaData(Qmmp::URL)).isEmpty()) { - map["mpris:artUrl"] = QString("file://") + - MetaDataManager::instance()->getCoverPath(m_core->metaData(Qmmp::URL)); + map["mpris:artUrl"] = QUrl::fromLocalFile( + MetaDataManager::instance()->getCoverPath(m_core->metaData(Qmmp::URL))).toString(); } if(!m_core->metaData(Qmmp::ALBUM).isEmpty()) map["xesam:album"] = m_core->metaData(Qmmp::ALBUM); @@ -146,7 +146,10 @@ QVariantMap Player2Object::metadata() const if(!m_core->metaData(Qmmp::TRACK).isEmpty()) map["xesam:trackNumber"] = m_core->metaData(Qmmp::TRACK).toInt(); map["mpris:trackid"] = QVariant::fromValue<QDBusObjectPath>(m_trackID); - map["xesam:url"] = m_core->metaData(Qmmp::URL); + if(m_core->metaData(Qmmp::URL).startsWith("/")) + map["xesam:url"] = QUrl::fromLocalFile(m_core->metaData(Qmmp::URL)).toString(); + else + map["xesam:url"] = m_core->metaData(Qmmp::URL); return map; } |
