mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-03 04:37:36 +02:00
* Only log playbacks which were played for at least 10 seconds (locally) and 20 seconds (remotely).
This commit is contained in:
@@ -57,8 +57,14 @@ DatabaseCommand_LogPlayback::postCommitHook()
|
||||
}
|
||||
|
||||
if( source()->isLocal() )
|
||||
{
|
||||
// Only tell remote sources about tracks that we listen to long enough
|
||||
if ( m_secsPlayed < 20 )
|
||||
return;
|
||||
|
||||
Servent::instance()->triggerDBSync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
@@ -69,6 +75,8 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
|
||||
|
||||
if ( m_action != Finished )
|
||||
return;
|
||||
if ( m_secsPlayed < 10 )
|
||||
return;
|
||||
|
||||
TomahawkSqlQuery query = dbi->newquery();
|
||||
query.prepare( "INSERT INTO playback_log(source, track, playtime, secs_played) "
|
||||
|
Reference in New Issue
Block a user