diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-05-09 08:32:35 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-05-09 08:32:35 +0000 |
| commit | 4edc7417385dca72a37efbdfb257ec50c5fe628b (patch) | |
| tree | 1b3c2ee7481ddf0f2d0681cc3cd115bb8b9e88de | |
| parent | 05c99c2e3fdf670827bb3a15c750bc9ea0b02e04 (diff) | |
| download | qmmp-4edc7417385dca72a37efbdfb257ec50c5fe628b.tar.gz qmmp-4edc7417385dca72a37efbdfb257ec50c5fe628b.tar.bz2 qmmp-4edc7417385dca72a37efbdfb257ec50c5fe628b.zip | |
enabled notifier plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7950 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/plugins/General/General.pro | 2 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Ui/qsui/mainwindow.cpp | 4 | ||||
| -rw-r--r-- | src/qmmp/soundcore.cpp | 12 | ||||
| -rw-r--r-- | src/qmmp/soundcore.h | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro index 589d14b7c..14cae0744 100644 --- a/src/plugins/General/General.pro +++ b/src/plugins/General/General.pro @@ -1,7 +1,7 @@ include(../../../qmmp.pri) SUBDIRS += statusicon \ -# notifier \ + notifier \ # lyrics \ # scrobbler \ # fileops \ diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp index c7d25db94..20b5b6195 100644 --- a/src/plugins/General/notifier/notifier.cpp +++ b/src/plugins/General/notifier/notifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2017 by Ilya Kotov * + * Copyright (C) 2008-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ Notifier::Notifier(QObject *parent) : QObject(parent) m_disableForFullScreen = settings.value("disable_fullscreen", false).toBool(); settings.endGroup(); m_core = SoundCore::instance(); - connect (m_core, SIGNAL(metaDataChanged ()), SLOT(showMetaData())); + connect (m_core, SIGNAL(trackInfoChanged()), SLOT(showMetaData())); connect (m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(setState(Qmmp::State))); connect (m_core, SIGNAL(volumeChanged(int, int)), SLOT(showVolume(int, int))); diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp index d5b72e04b..7837aff65 100644 --- a/src/plugins/General/notifier/popupwidget.cpp +++ b/src/plugins/General/notifier/popupwidget.cpp @@ -84,11 +84,11 @@ void PopupWidget::showMetaData() m_timer->stop(); SoundCore *core = SoundCore::instance(); - QString title = m_formatter.format(core->metaData(), core->duration() / 1000); + QString title = m_formatter.format(core->trackInfo()); m_label1->setText(title); - QPixmap pix = MetaDataManager::instance()->getCover(core->metaData(Qmmp::URL)); + QPixmap pix = MetaDataManager::instance()->getCover(core->path()); if(!pix.isNull()) { m_pixlabel->setFixedSize(m_coverSize,m_coverSize); diff --git a/src/plugins/Ui/qsui/mainwindow.cpp b/src/plugins/Ui/qsui/mainwindow.cpp index fe93a2976..1548ec421 100644 --- a/src/plugins/Ui/qsui/mainwindow.cpp +++ b/src/plugins/Ui/qsui/mainwindow.cpp @@ -224,9 +224,9 @@ void MainWindow::showState(Qmmp::State state) case Qmmp::Playing: { updateStatus(); - m_analyzer->setCover(MetaDataManager::instance()->getCover(m_core->url())); + m_analyzer->setCover(MetaDataManager::instance()->getCover(m_core->path())); CoverWidget *cw = qobject_cast<CoverWidget *>(m_ui.coverDockWidget->widget()); - cw->setCover(MetaDataManager::instance()->getCover(m_core->url())); + cw->setCover(MetaDataManager::instance()->getCover(m_core->path())); break; } case Qmmp::Paused: diff --git a/src/qmmp/soundcore.cpp b/src/qmmp/soundcore.cpp index 90ba8d54c..ce3863b55 100644 --- a/src/qmmp/soundcore.cpp +++ b/src/qmmp/soundcore.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -97,7 +97,7 @@ bool SoundCore::play(const QString &source, bool queue, qint64 offset) void SoundCore::stop() { qApp->sendPostedEvents(this, 0); - m_url.clear(); + m_path.clear(); qDeleteAll(m_sources); m_sources.clear(); m_nextState = NO_ENGINE; @@ -125,9 +125,9 @@ void SoundCore::seek(qint64 pos) m_engine->seek(pos); } -const QString SoundCore::url() const +const QString SoundCore::path() const { - return m_url; + return m_path; } bool SoundCore::nextTrackAccepted() const @@ -266,12 +266,12 @@ void SoundCore::startNextSource() return; InputSource *s = m_sources.dequeue(); - m_url = s->url(); + m_path = s->url(); if(s->ioDevice() && !s->ioDevice()->isOpen() && !s->ioDevice()->open(QIODevice::ReadOnly)) { qWarning("SoundCore: input error: %s", qPrintable(s->ioDevice()->errorString())); - m_url.clear(); + m_path.clear(); s->deleteLater(); m_nextState = INVALID_SOURCE; if(m_handler->state() == Qmmp::Stopped || m_handler->state() == Qmmp::Buffering) diff --git a/src/qmmp/soundcore.h b/src/qmmp/soundcore.h index 87060661c..75fbf9543 100644 --- a/src/qmmp/soundcore.h +++ b/src/qmmp/soundcore.h @@ -180,7 +180,7 @@ public slots: /*! * This function returns file path or stream url. */ - const QString url() const; + const QString path() const; signals: /*! @@ -261,7 +261,7 @@ private: }; QHash <QString, QString> m_streamInfo; TrackInfo m_info; - QString m_url; + QString m_path; static SoundCore* m_instance; StateHandler *m_handler; VolumeControl *m_volumeControl; |
