From c8134e1cf570aa2dc1d213e93769b3a290fb58f2 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 30 May 2018 20:28:36 +0000 Subject: enabled all remaining plugins git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7982 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/kdenotify/kdenotify.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/plugins/General/kdenotify') 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 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(); } @@ -121,12 +122,12 @@ QList 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; -- cgit v1.2.3-13-gbd6f