Null check to pass the test... previous code worked fine on my computer *shrug*

This commit is contained in:
Scott Karbon 2023-02-17 12:13:39 -05:00
parent a75fc39ddd
commit 430a53d5cd
1 changed files with 9 additions and 3 deletions

View File

@ -266,11 +266,17 @@ public class MusicBrainzAlbumProvider : IRemoteMetadataProvider<MusicAlbum, Albu
if (rspobj.Media != null)
{
foreach (var t in rspobj.Media.SelectMany(m => m.Tracks))
foreach (var m in rspobj.Media)
{
if (t != null)
if (m.Tracks != null)
{
tracks.Add(t);
foreach (var t in m.Tracks)
{
if (t != null)
{
tracks.Add(t);
}
}
}
}
}