Commit 2799522f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Add an assertion about candidate albums' AlbumArtist

Every album must have an associated album artist
parent e952972d
...@@ -473,6 +473,10 @@ std::shared_ptr<Album> MetadataParser::findAlbum( parser::Task& task, std::share ...@@ -473,6 +473,10 @@ std::shared_ptr<Album> MetadataParser::findAlbum( parser::Task& task, std::share
{ {
auto a = (*it).get(); auto a = (*it).get();
auto candidateAlbumArtist = a->albumArtist(); auto candidateAlbumArtist = a->albumArtist();
// When we find an album, we will systematically assign an artist to it.
// Not having an album artist (even it it's only a temporary one in the
// case of a compilation album) is not expected at all.
assert( candidateAlbumArtist != nullptr );
if ( albumArtist != nullptr ) if ( albumArtist != nullptr )
{ {
// We assume that an album without album artist is a positive match. // We assume that an album without album artist is a positive match.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment