From 659b8fa0d5ee5623f682cf56b37607987d439432 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 21 Jun 2011 06:36:34 +0200 Subject: [PATCH] * Set the proper playback source on LogPlayback queries. --- src/libtomahawk/database/databasecommand_logplayback.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/database/databasecommand_logplayback.cpp b/src/libtomahawk/database/databasecommand_logplayback.cpp index 12ffa5c5e..b14ab6e3c 100644 --- a/src/libtomahawk/database/databasecommand_logplayback.cpp +++ b/src/libtomahawk/database/databasecommand_logplayback.cpp @@ -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 ); }