Commit 7f316e4e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Remove superfluous condition

As described and asserted a few lines above, the candidate album
AlbumArtist can't be nullptr
parent 0879bd6c
......@@ -488,7 +488,7 @@ std::shared_ptr<Album> MetadataParser::findAlbum( parser::Task& task, std::share
{
// We assume that an album without album artist is a positive match.
// At the end of the day, without proper tags, there's only so much we can do.
if ( candidateAlbumArtist != nullptr && candidateAlbumArtist->id() != albumArtist->id() )
if ( candidateAlbumArtist->id() != albumArtist->id() )
{
it = albums.erase( it );
continue;
......@@ -535,10 +535,8 @@ std::shared_ptr<Album> MetadataParser::findAlbum( parser::Task& task, std::share
// Not taking the artist in consideration would cause compilation to
// create multiple albums, especially when track are only partially
// tagged with a year.
if ( ( albumArtist != nullptr && candidateAlbumArtist != nullptr &&
albumArtist->id() == candidateAlbumArtist->id() ) ||
( trackArtist != nullptr && candidateAlbumArtist != nullptr &&
trackArtist->id() == candidateAlbumArtist->id() ) )
if ( ( albumArtist != nullptr && albumArtist->id() == candidateAlbumArtist->id() ) ||
( trackArtist != nullptr && trackArtist->id() == candidateAlbumArtist->id() ) )
{
auto candidateDate = task.vlcMedia.meta( libvlc_meta_Date );
if ( candidateDate.empty() == false )
......
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