Commit 5f37e683 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

test: samples: Use AlbumTrack->artist to check for tracks artists

Media::artist is bound to disappear soon
parent 7accea8b
......@@ -261,7 +261,13 @@ void Tests::checkAlbumTracks( const IAlbum* album, const std::vector<MediaPtr>&
}
if ( expectedTrack.HasMember( "artist" ) )
{
if ( strcasecmp( expectedTrack["artist"].GetString(), track->artist().c_str() ) != 0 )
auto artist = albumTrack->artist();
if ( artist == nullptr )
return ;
if ( strlen( expectedTrack["artist"].GetString() ) == 0 &&
artist->id() != medialibrary::UnknownArtistID )
return ;
else if ( strcasecmp( expectedTrack["artist"].GetString(), artist->name().c_str() ) != 0 )
return ;
}
if ( expectedTrack.HasMember( "genre" ) )
......
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