Merge pull request #12022 from l2dy/patch-1

Improve empty list check
This commit is contained in:
Bond-009 2024-06-15 15:25:56 +02:00 committed by GitHub
commit 9a6f4372f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -998,7 +998,7 @@ namespace MediaBrowser.Providers.Manager
{
targetResult.People = sourceResult.People;
}
else if (sourceResult.People is not null && sourceResult.People.Count >= 0)
else if (sourceResult.People is not null && sourceResult.People.Count > 0)
{
MergePeople(sourceResult.People, targetResult.People);
}
@ -1188,7 +1188,7 @@ namespace MediaBrowser.Providers.Manager
{
targetHasAlbumArtist.AlbumArtists = sourceHasAlbumArtist.AlbumArtists;
}
else if (sourceHasAlbumArtist.AlbumArtists.Count >= 0)
else if (sourceHasAlbumArtist.AlbumArtists.Count > 0)
{
targetHasAlbumArtist.AlbumArtists = targetHasAlbumArtist.AlbumArtists.Concat(sourceHasAlbumArtist.AlbumArtists).Distinct().ToArray();
}