diff options
Diffstat (limited to 'src/plugins/General')
| -rw-r--r-- | src/plugins/General/scrobbler/lastfmscrobbler.cpp | 7 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/librefmscrobbler.cpp | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/General/scrobbler/lastfmscrobbler.cpp b/src/plugins/General/scrobbler/lastfmscrobbler.cpp index 2a449c410..145cb1676 100644 --- a/src/plugins/General/scrobbler/lastfmscrobbler.cpp +++ b/src/plugins/General/scrobbler/lastfmscrobbler.cpp @@ -129,15 +129,15 @@ void LastfmScrobbler::setState(Qmmp::State state) switch ((uint) state) { case Qmmp::Playing: - if (previousState != Qmmp::Paused) + if (previousState != Qmmp::Paused) { qDebug("LastfmScrobbler: new song started"); m_start_ts = QDateTime::currentDateTime().toTime_t(); elapsed = 0; } - else + else { - qDebug("LastfmScrobbler: resuming after pause, %d seconds played", elapsed / 1000); + qDebug("LastfmScrobbler: resuming from %d seconds played", elapsed / 1000); } m_time->restart(); break; @@ -448,6 +448,7 @@ void LastfmAuth::getSession() void LastfmAuth::checkSession(const QString &session) { qDebug("LastfmAuth: checking session..."); + m_session = session; QMap <QString, QString> params; params.insert("api_key", API_KEY); params.insert("sk", session); diff --git a/src/plugins/General/scrobbler/librefmscrobbler.cpp b/src/plugins/General/scrobbler/librefmscrobbler.cpp index 7ececc155..56ec4b7ea 100644 --- a/src/plugins/General/scrobbler/librefmscrobbler.cpp +++ b/src/plugins/General/scrobbler/librefmscrobbler.cpp @@ -90,9 +90,13 @@ void LibrefmScrobbler::setState(Qmmp::State state) if (previousState != Qmmp::Paused) { m_start_ts = QDateTime::currentDateTime().toTime_t(); - m_time->restart(); elapsed = 0; } + else + { + qDebug("LibrefmScrobbler: resuming from %d seconds played", elapsed / 1000); + } + m_time->restart(); if (!isReady() && !m_handshakeReply) handshake(); break; @@ -120,6 +124,7 @@ void LibrefmScrobbler::setState(Qmmp::State state) default: ; } + previousState = state; } void LibrefmScrobbler::updateMetaData() |
