Prevent double iterating over all seasons (#11700)

This commit is contained in:
Tim Eisele 2024-05-17 20:13:49 +02:00 committed by GitHub
parent 832e27a8fb
commit 5200633574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ namespace MediaBrowser.Providers.TV
targetItem.SetSeasonName(number, name);
}
}
else if (!sourceSeasonNames.Keys.All(targetSeasonNames.ContainsKey))
else
{
var newSeasons = sourceSeasonNames.Where(s => !targetSeasonNames.ContainsKey(s.Key));
foreach (var (number, name) in newSeasons)