diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-05-02 10:16:40 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-05-02 10:16:40 +0000 |
| commit | 9bdd208bbb16ec15d52653a9913789b44b3b28b3 (patch) | |
| tree | 4b4c6aafc3b3cdefdece02d976bd2da357d42a5c /src/plugins/General/statusicon | |
| parent | e2f78b8713a26a1f7aac119ffeea8ad9e1c16eed (diff) | |
| download | qmmp-9bdd208bbb16ec15d52653a9913789b44b3b28b3.tar.gz qmmp-9bdd208bbb16ec15d52653a9913789b44b3b28b3.tar.bz2 qmmp-9bdd208bbb16ec15d52653a9913789b44b3b28b3.zip | |
removed Qmmp::URL
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7943 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/statusicon')
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.cpp | 20 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusiconpopupwidget.cpp | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/General/statusicon/statusicon.cpp b/src/plugins/General/statusicon/statusicon.cpp index 86a260324..a4b96b7d3 100644 --- a/src/plugins/General/statusicon/statusicon.cpp +++ b/src/plugins/General/statusicon/statusicon.cpp @@ -124,21 +124,21 @@ void StatusIcon::setState(Qmmp::State state) void StatusIcon::showMetaData() { - QMap<Qmmp::MetaData, QString> meta = m_core->metaData(); - if(m_splitFileName && meta[Qmmp::TITLE].isEmpty() && !meta[Qmmp::URL].contains("://")) + TrackInfo info = m_core->trackInfo(); + if(m_splitFileName && info.value(Qmmp::TITLE).isEmpty() && !info.path().contains("://")) { - QString name = QFileInfo(meta[Qmmp::URL]).completeBaseName(); + QString name = QFileInfo(info.path()).completeBaseName(); if(name.contains("-")) { - meta[Qmmp::TITLE] = name.section('-',1,1).trimmed(); - if(meta[Qmmp::ARTIST].isEmpty()) - meta[Qmmp::ARTIST] = name.section('-',0,0).trimmed(); + info.setValue(Qmmp::TITLE, name.section('-',1,1).trimmed()); + if(info.value(Qmmp::ARTIST).isEmpty()) + info.setValue(Qmmp::ARTIST, name.section('-',0,0).trimmed()); } } - QString message = m_messageFormatter.format(meta, m_core->duration()); + QString message = m_messageFormatter.format(&info); if (message.isEmpty()) - message = meta[Qmmp::URL].section('/',-1); + message = info.path().section('/',-1); if (m_showMessage) m_tray->showMessage (tr("Now Playing"), message, @@ -146,9 +146,9 @@ void StatusIcon::showMetaData() if(m_showToolTip) { - message = m_toolTipFormatter.format(meta, m_core->duration()); + message = m_toolTipFormatter.format(&info); if(message.isEmpty()) - message = meta[Qmmp::URL].section('/',-1); + message = info.path().section('/',-1); m_tray->setToolTip(message); } } diff --git a/src/plugins/General/statusicon/statusiconpopupwidget.cpp b/src/plugins/General/statusicon/statusiconpopupwidget.cpp index e219d4122..e74492fb0 100644 --- a/src/plugins/General/statusicon/statusiconpopupwidget.cpp +++ b/src/plugins/General/statusicon/statusiconpopupwidget.cpp @@ -100,7 +100,7 @@ void StatusIconPopupWidget::updateMetaData(const QString &message) m_textLabel->setText(message); if(core->state() == Qmmp::Playing || core->state() == Qmmp::Paused) { - QPixmap cover = MetaDataManager::instance()->getCover(core->metaData(Qmmp::URL)); + QPixmap cover = MetaDataManager::instance()->getCover(core->trackInfo().path()); m_cover->show(); m_bar->show(); if(cover.isNull()) |
