From aaacecbb7196ad3d61cb60270d4d0ce6fc905329 Mon Sep 17 00:00:00 2001 From: hansschmucker Date: Thu, 13 Nov 2014 15:30:43 +0100 Subject: [PATCH] Check whether albumartist is blank before trying to add it. --- src/libtomahawk/database/DatabaseCommand_AddFiles.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libtomahawk/database/DatabaseCommand_AddFiles.cpp b/src/libtomahawk/database/DatabaseCommand_AddFiles.cpp index b0ed37c43..6862dd3d6 100644 --- a/src/libtomahawk/database/DatabaseCommand_AddFiles.cpp +++ b/src/libtomahawk/database/DatabaseCommand_AddFiles.cpp @@ -131,6 +131,11 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi ) v = m; artistid = dbi->artistId( artist, true ); + // add the album artist to the artist database + albumartistid = dbi->artistId( albumartist, true ); + + if ( !artist.trimmed().isEmpty() ) + artistid = dbi->artistId( artist, true ); if ( artistid < 1 ) continue; trackid = dbi->trackId( artistid, track, true );