aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General')
-rw-r--r--src/plugins/General/scrobbler/scrobbler.cpp2
-rw-r--r--src/plugins/General/scrobbler/scrobbler.h2
-rw-r--r--src/plugins/General/scrobbler/scrobbler2.cpp2
-rw-r--r--src/plugins/General/scrobbler/scrobbler2.h2
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;