1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Only auto-create in logplayback if there's a valid artist

This commit is contained in:
Leo Franchi
2011-10-12 17:54:35 -04:00
parent e4f8c229b4
commit 648b2d69f9

View File

@@ -88,7 +88,8 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
qDebug() << "Logging playback of" << m_artist << "-" << m_track << "for source" << srcid; qDebug() << "Logging playback of" << m_artist << "-" << m_track << "for source" << srcid;
query.bindValue( 0, srcid ); query.bindValue( 0, srcid );
bool autoCreate = true; // If there's no artist, becuase it's a resolver result with bad metadata for example, don't save it
bool autoCreate = m_artist.isEmpty();
int artid = dbi->artistId( m_artist, autoCreate ); int artid = dbi->artistId( m_artist, autoCreate );
if( artid < 1 ) if( artid < 1 )
return; return;