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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user