diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.h | 2 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler2.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler2.h | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp index 0207f5a74..bfa236c11 100644 --- a/src/plugins/General/scrobbler/scrobbler.cpp +++ b/src/plugins/General/scrobbler/scrobbler.cpp @@ -135,7 +135,7 @@ void Scrobbler::setState(Qmmp::State state) case Qmmp::Stopped: if (!m_song.metaData().isEmpty() && ((m_time->elapsed ()/1000 > 240) || (m_time->elapsed ()/1000 > int(m_song.length()/2))) - && (m_time->elapsed ()/1000 > 60)) + && (m_song.length() > MIN_SONG_LENGTH)) { m_song.setTimeStamp(m_start_ts); m_songCache << m_song; diff --git a/src/plugins/General/scrobbler/scrobbler.h b/src/plugins/General/scrobbler/scrobbler.h index 0e733321d..da98a5ba6 100644 --- a/src/plugins/General/scrobbler/scrobbler.h +++ b/src/plugins/General/scrobbler/scrobbler.h @@ -82,6 +82,8 @@ private slots: void handshake(); private: + enum { MIN_SONG_LENGTH = 30 }; + void submit(); void sendNotification(const SongInfo &info); bool isReady(); diff --git a/src/plugins/General/scrobbler/scrobbler2.cpp b/src/plugins/General/scrobbler/scrobbler2.cpp index b73539fe3..7f25ec3d9 100644 --- a/src/plugins/General/scrobbler/scrobbler2.cpp +++ b/src/plugins/General/scrobbler/scrobbler2.cpp @@ -126,7 +126,7 @@ void Scrobbler2::setState(Qmmp::State state) case Qmmp::Stopped: if (!m_song.metaData().isEmpty() && ((m_time->elapsed ()/1000 > 240) || (m_time->elapsed ()/1000 > int(m_song.length()/2))) - && (m_time->elapsed ()/1000 > 60)) + && (m_song.length() > MIN_SONG_LENGTH)) { m_song.setTimeStamp(m_start_ts); m_songCache << m_song; diff --git a/src/plugins/General/scrobbler/scrobbler2.h b/src/plugins/General/scrobbler/scrobbler2.h index 36dc928c6..91ae10b1f 100644 --- a/src/plugins/General/scrobbler/scrobbler2.h +++ b/src/plugins/General/scrobbler/scrobbler2.h @@ -50,6 +50,8 @@ private slots: void submit(); private: + enum { MIN_SONG_LENGTH = 30 }; + void sendNotification(const SongInfo &info); void syncCache(); uint m_start_ts; |
