Skip to content
Snippets Groups Projects
Commit 3380f620 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Artist: Update cached nbTracks when adding a media

parent 42be1dab
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,10 @@ bool Artist::addMedia( const Media& media )
{
static const std::string req = "INSERT INTO " + MediaRelationTable::Name +
" VALUES(?, ?)";
return sqlite::Tools::executeInsert( m_ml->getConn(), req, media.id(), m_id ) != 0;
if ( sqlite::Tools::executeInsert( m_ml->getConn(), req, media.id(), m_id ) == 0 )
return false;
++m_nbTracks;
return true;
}
ThumbnailStatus Artist::thumbnailStatus( ThumbnailSizeType sizeType ) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment