Improve empty list check

pull/12022/head
Zero King 8 months ago committed by GitHub
parent f0c8273b63
commit 8caefc2a55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -998,7 +998,7 @@ namespace MediaBrowser.Providers.Manager
{ {
targetResult.People = sourceResult.People; 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); MergePeople(sourceResult.People, targetResult.People);
} }
@ -1188,7 +1188,7 @@ namespace MediaBrowser.Providers.Manager
{ {
targetHasAlbumArtist.AlbumArtists = sourceHasAlbumArtist.AlbumArtists; 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(); targetHasAlbumArtist.AlbumArtists = targetHasAlbumArtist.AlbumArtists.Concat(sourceHasAlbumArtist.AlbumArtists).Distinct().ToArray();
} }

Loading…
Cancel
Save