aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General')
-rw-r--r--src/plugins/General/kdenotify/kdenotify.cpp4
-rw-r--r--src/plugins/General/mpris/mpris1/playerobject.cpp6
-rw-r--r--src/plugins/General/mpris/mpris2/player2object.cpp4
-rw-r--r--src/plugins/General/notifier/notifier.cpp2
-rw-r--r--src/plugins/General/notifier/popupwidget.cpp2
-rw-r--r--src/plugins/General/scrobbler/scrobbler.cpp2
-rw-r--r--src/plugins/General/statusicon/statusicon.cpp4
-rw-r--r--src/plugins/General/statusicon/statusiconpopupwidget.cpp2
8 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/General/kdenotify/kdenotify.cpp b/src/plugins/General/kdenotify/kdenotify.cpp
index d4bb4a482..6b0826769 100644
--- a/src/plugins/General/kdenotify/kdenotify.cpp
+++ b/src/plugins/General/kdenotify/kdenotify.cpp
@@ -95,7 +95,7 @@ KdeNotify::~KdeNotify()
QString KdeNotify::totalTimeString()
{
- int time = SoundCore::instance()->totalTime()/1000;
+ int time = SoundCore::instance()->duration()/1000;
if(time >= 3600)
{
@@ -121,7 +121,7 @@ QList<QVariant> KdeNotify::prepareNotification()
args.append(tr("Qmmp now playing:")); //summary (notification title)
MetaDataFormatter f(m_template);
- QString body = f.format(core->metaData(), core->totalTime()/1000);
+ QString body = f.format(core->metaData(), core->duration()/1000);
QString coverPath;
if(m_showCovers)
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(
diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp
index c55008406..c7d25db94 100644
--- a/src/plugins/General/notifier/notifier.cpp
+++ b/src/plugins/General/notifier/notifier.cpp
@@ -136,7 +136,7 @@ void Notifier::showMetaData()
data.append(m_core->metaData(Qmmp::ARTIST).toUtf8()+"\n");
data.append(m_core->metaData(Qmmp::ALBUM).toUtf8()+"\n");
data.append(m_core->metaData(Qmmp::TRACK).toUtf8()+"\n");
- data.append(QString("%1").arg(m_core->totalTime()/1000).toUtf8()+"\n");
+ data.append(QString("%1").arg(m_core->duration()/1000).toUtf8()+"\n");
foreach(QString path, m_psiTuneFiles)
{
diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp
index b3a4c136a..d5b72e04b 100644
--- a/src/plugins/General/notifier/popupwidget.cpp
+++ b/src/plugins/General/notifier/popupwidget.cpp
@@ -84,7 +84,7 @@ void PopupWidget::showMetaData()
m_timer->stop();
SoundCore *core = SoundCore::instance();
- QString title = m_formatter.format(core->metaData(), core->totalTime() / 1000);
+ QString title = m_formatter.format(core->metaData(), core->duration() / 1000);
m_label1->setText(title);
diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp
index b4f10e634..3c90abbbe 100644
--- a/src/plugins/General/scrobbler/scrobbler.cpp
+++ b/src/plugins/General/scrobbler/scrobbler.cpp
@@ -178,7 +178,7 @@ void Scrobbler::updateMetaData()
if(!metadata.value(Qmmp::TITLE).isEmpty() && !metadata.value(Qmmp::ARTIST).isEmpty())
{
- m_song = SongInfo(metadata, m_core->totalTime()/1000);
+ m_song = SongInfo(metadata, m_core->duration()/1000);
m_song.setTimeStamp(QDateTime::currentDateTime().toTime_t());
sendNotification(m_song);
}
diff --git a/src/plugins/General/statusicon/statusicon.cpp b/src/plugins/General/statusicon/statusicon.cpp
index f33e395e8..21f1a6519 100644
--- a/src/plugins/General/statusicon/statusicon.cpp
+++ b/src/plugins/General/statusicon/statusicon.cpp
@@ -136,7 +136,7 @@ void StatusIcon::showMetaData()
}
}
- QString message = m_messageFormatter.format(meta, m_core->totalTime() / 1000);
+ QString message = m_messageFormatter.format(meta, m_core->duration() / 1000);
if (message.isEmpty())
message = meta[Qmmp::URL].section('/',-1);
@@ -146,7 +146,7 @@ void StatusIcon::showMetaData()
if(m_showToolTip)
{
- message = m_toolTipFormatter.format(meta, m_core->totalTime() / 1000);
+ message = m_toolTipFormatter.format(meta, m_core->duration() / 1000);
if(message.isEmpty())
message = meta[Qmmp::URL].section('/',-1);
m_tray->setToolTip(message);
diff --git a/src/plugins/General/statusicon/statusiconpopupwidget.cpp b/src/plugins/General/statusicon/statusiconpopupwidget.cpp
index 11439ecd6..e219d4122 100644
--- a/src/plugins/General/statusicon/statusiconpopupwidget.cpp
+++ b/src/plugins/General/statusicon/statusiconpopupwidget.cpp
@@ -126,7 +126,7 @@ void StatusIconPopupWidget::updateMetaData(const QString &message)
void StatusIconPopupWidget::updateTime(qint64 elapsed)
{
- m_bar->setMaximum(SoundCore::instance()->totalTime()/1000);
+ m_bar->setMaximum(SoundCore::instance()->duration()/1000);
m_bar->setValue(elapsed/1000);
m_bar->update();
}