aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/kdenotify/kdenotify.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-05-30 20:28:36 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-05-30 20:28:36 +0000
commitc8134e1cf570aa2dc1d213e93769b3a290fb58f2 (patch)
treec26295debb015bc3e3043455f99163073e002be5 /src/plugins/General/kdenotify/kdenotify.cpp
parent4ab1964bb6cd90ef26e6d6060427038b88e0c37f (diff)
downloadqmmp-c8134e1cf570aa2dc1d213e93769b3a290fb58f2.tar.gz
qmmp-c8134e1cf570aa2dc1d213e93769b3a290fb58f2.tar.bz2
qmmp-c8134e1cf570aa2dc1d213e93769b3a290fb58f2.zip
enabled all remaining plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7982 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/kdenotify/kdenotify.cpp')
-rw-r--r--src/plugins/General/kdenotify/kdenotify.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/General/kdenotify/kdenotify.cpp b/src/plugins/General/kdenotify/kdenotify.cpp
index 6b0826769..70dfa1489 100644
--- a/src/plugins/General/kdenotify/kdenotify.cpp
+++ b/src/plugins/General/kdenotify/kdenotify.cpp
@@ -74,7 +74,7 @@ KdeNotify::KdeNotify(QObject *parent) : QObject(parent),m_useFreedesktopSpec(fal
if(m_updateNotify)
{
- connect(SoundCore::instance(),SIGNAL(metaDataChanged()),SLOT(showMetaData()));
+ connect(SoundCore::instance(),SIGNAL(trackInfoChanged()),SLOT(showMetaData()));
connect(m_notifier,SIGNAL(NotificationClosed(uint,uint)),this,SLOT(notificationClosed(uint,uint)));
}
else
@@ -83,7 +83,7 @@ KdeNotify::KdeNotify(QObject *parent) : QObject(parent),m_useFreedesktopSpec(fal
timer->setSingleShot(true);
timer->setInterval(NOTIFY_DELAY); //after that notification will be showed.
connect(timer,SIGNAL(timeout()),SLOT(showMetaData()));
- connect(SoundCore::instance(),SIGNAL(metaDataChanged()),timer, SLOT(start()));
+ connect(SoundCore::instance(),SIGNAL(trackInfoChanged()),timer, SLOT(start()));
}
}
@@ -108,7 +108,8 @@ QString KdeNotify::totalTimeString()
QList<QVariant> KdeNotify::prepareNotification()
{
SoundCore *core = SoundCore::instance();
- if(core->metaData(Qmmp::URL).isEmpty()) //prevent show empty notification
+ TrackInfo info = core->trackInfo();
+ if(info.isEmpty()) //prevent show empty notification
{
return QList<QVariant>();
}
@@ -121,12 +122,12 @@ QList<QVariant> KdeNotify::prepareNotification()
args.append(tr("Qmmp now playing:")); //summary (notification title)
MetaDataFormatter f(m_template);
- QString body = f.format(core->metaData(), core->duration()/1000);
+ QString body = f.format(info);
QString coverPath;
if(m_showCovers)
{
- QPixmap cover = MetaDataManager::instance()->getCover(core->metaData(Qmmp::URL));
+ QPixmap cover = MetaDataManager::instance()->getCover(info.path());
if(!cover.isNull())
{
coverPath = m_coverPath;