1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

* Set the proper playback source on LogPlayback queries.

This commit is contained in:
Christian Muehlhaeuser
2011-06-21 06:36:34 +02:00
parent b5180f33b8
commit 659b8fa0d5

View File

@@ -40,12 +40,14 @@ DatabaseCommand_LogPlayback::postCommitHook()
// do not auto resolve this track // do not auto resolve this track
Tomahawk::query_ptr q = Tomahawk::Query::get( m_artist, m_track, QString() ); Tomahawk::query_ptr q = Tomahawk::Query::get( m_artist, m_track, QString() );
q->setPlayedBy( source() );
if ( m_action == Finished ) if ( m_action == Finished )
{ {
emit trackPlayed( q ); emit trackPlayed( q );
} }
else if ( m_action == Started && QDateTime::fromTime_t( playtime() ).secsTo( QDateTime::currentDateTime() ) < 600 ) // if the play time is more than 10 minutes in the past, ignore // if the play time is more than 10 minutes in the past, ignore
else if ( m_action == Started && QDateTime::fromTime_t( playtime() ).secsTo( QDateTime::currentDateTime() ) < 600 )
{ {
emit trackPlaying( q ); emit trackPlaying( q );
} }