mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fix error when season stats are missing
This commit is contained in:
parent
5a2fa41af7
commit
4c3c705517
@ -167,9 +167,12 @@ private void LinkSeriesStatistics(SeriesResource resource, SeriesStatistics seri
|
||||
resource.PreviousAiring = seriesStatistics.PreviousAiring;
|
||||
resource.SizeOnDisk = seriesStatistics.SizeOnDisk;
|
||||
|
||||
foreach (var season in resource.Seasons)
|
||||
if (seriesStatistics.SeasonStatistics != null)
|
||||
{
|
||||
season.Statistics = seriesStatistics.SeasonStatistics.SingleOrDefault(s => s.SeasonNumber == season.SeasonNumber).InjectTo<SeasonStatisticsResource>();
|
||||
foreach (var season in resource.Seasons)
|
||||
{
|
||||
season.Statistics = seriesStatistics.SeasonStatistics.SingleOrDefault(s => s.SeasonNumber == season.SeasonNumber).InjectTo<SeasonStatisticsResource>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user