mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Don't double-check playback-logs for remotes.
This commit is contained in:
@@ -78,7 +78,7 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
|
|||||||
QVariant srcid = source()->isLocal() ? QVariant( QVariant::Int ) : source()->id();
|
QVariant srcid = source()->isLocal() ? QVariant( QVariant::Int ) : source()->id();
|
||||||
TomahawkSqlQuery query = dbi->newquery();
|
TomahawkSqlQuery query = dbi->newquery();
|
||||||
|
|
||||||
if ( m_playtime > 0 )
|
if ( m_playtime > 0 && source()->isLocal() )
|
||||||
{
|
{
|
||||||
query.prepare( QString( "SELECT * FROM playback_log WHERE source %1 AND playtime = %2" ).arg( srcid.isNull() ? "IS NULL" : srcid.toString() ).arg( m_playtime ) );
|
query.prepare( QString( "SELECT * FROM playback_log WHERE source %1 AND playtime = %2" ).arg( srcid.isNull() ? "IS NULL" : srcid.toString() ).arg( m_playtime ) );
|
||||||
query.exec();
|
query.exec();
|
||||||
@@ -88,7 +88,8 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ( m_playtime == 0 )
|
||||||
m_playtime = QDateTime::currentDateTimeUtc().toTime_t();
|
m_playtime = QDateTime::currentDateTimeUtc().toTime_t();
|
||||||
|
|
||||||
// tDebug() << "Logging playback of" << m_artist << "-" << m_track << "for source" << srcid << "- timestamp:" << m_playtime;
|
// tDebug() << "Logging playback of" << m_artist << "-" << m_track << "for source" << srcid << "- timestamp:" << m_playtime;
|
||||||
|
Reference in New Issue
Block a user