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:
@@ -40,12 +40,14 @@ DatabaseCommand_LogPlayback::postCommitHook()
|
||||
|
||||
// do not auto resolve this track
|
||||
Tomahawk::query_ptr q = Tomahawk::Query::get( m_artist, m_track, QString() );
|
||||
q->setPlayedBy( source() );
|
||||
|
||||
if ( m_action == Finished )
|
||||
{
|
||||
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 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user