1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01: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 61f3e1854c
commit 46f6941325

View File

@ -88,7 +88,8 @@ DatabaseCommand_LogPlayback::exec( DatabaseImpl* dbi )
qDebug() << "Logging playback of" << m_artist << "-" << m_track << "for source" << 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 );
if( artid < 1 )
return;