aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/mpris
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/mpris')
-rw-r--r--src/plugins/General/mpris/mpris1/playerobject.cpp6
-rw-r--r--src/plugins/General/mpris/mpris2/player2object.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/General/mpris/mpris1/playerobject.cpp b/src/plugins/General/mpris/mpris1/playerobject.cpp
index 866a9858b..a1b3c490b 100644
--- a/src/plugins/General/mpris/mpris1/playerobject.cpp
+++ b/src/plugins/General/mpris/mpris1/playerobject.cpp
@@ -138,8 +138,8 @@ QVariantMap PlayerObject::GetMetadata()
map.insert("albumartist", m_core->metaData(Qmmp::ALBUMARTIST));
map.insert("album", m_core->metaData(Qmmp::ALBUM));
map.insert("tracknumber", m_core->metaData(Qmmp::TRACK));
- map.insert("time", (quint32)m_core->totalTime()/1000);
- map.insert("mtime", (quint32)m_core->totalTime());
+ map.insert("time", (quint32)m_core->duration()/1000);
+ map.insert("mtime", (quint32)m_core->duration());
map.insert("genre", m_core->metaData(Qmmp::GENRE));
map.insert("comment", m_core->metaData(Qmmp::COMMENT));
map.insert("audio-bitrate", (quint32)m_core->bitrate());
@@ -155,7 +155,7 @@ int PlayerObject::GetCaps()
caps |= CAN_PAUSE;
else
caps |= CAN_PLAY;
- if ((GetStatus().state < 2) && (m_core->totalTime() > 0))
+ if ((GetStatus().state < 2) && (m_core->duration() > 0))
caps |= CAN_SEEK;
caps |= CAN_GO_NEXT;
caps |= CAN_GO_PREV;
diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp
index ccdb8c70a..cee1aebfe 100644
--- a/src/plugins/General/mpris/mpris2/player2object.cpp
+++ b/src/plugins/General/mpris/mpris2/player2object.cpp
@@ -83,7 +83,7 @@ bool Player2Object::canPlay() const
bool Player2Object::canSeek() const
{
- return m_core->totalTime() > 0;
+ return m_core->duration() > 0;
}
QString Player2Object::loopStatus() const
@@ -126,7 +126,7 @@ QVariantMap Player2Object::metadata() const
if(!track || m_core->metaData(Qmmp::URL).isEmpty())
return QVariantMap();
QVariantMap map;
- map["mpris:length"] = qMax(m_core->totalTime() * 1000 , qint64(0));
+ map["mpris:length"] = qMax(m_core->duration() * 1000 , qint64(0));
if(!MetaDataManager::instance()->getCoverPath(m_core->metaData(Qmmp::URL)).isEmpty())
{
map["mpris:artUrl"] = QUrl::fromLocalFile(