From 9bdd208bbb16ec15d52653a9913789b44b3b28b3 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 2 May 2018 10:16:40 +0000 Subject: removed Qmmp::URL git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7943 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/statusicon/statusicon.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/plugins/General/statusicon/statusicon.cpp') 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 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); } } -- cgit v1.2.3-13-gbd6f