Series/Details season status now shows the correct season status.

pull/3113/head
Mark McDowall 13 years ago
parent cc8f8bec06
commit 53c4641c07

@ -120,7 +120,7 @@ namespace NzbDrone.Web.Controllers
foreach (var season in episodes.Select(s => s.SeasonNumber).Distinct()) foreach (var season in episodes.Select(s => s.SeasonNumber).Distinct())
{ {
var episodesInSeason = episodes.Where(e => e.SeasonNumber == season).ToList(); var episodesInSeason = episodes.Where(e => e.SeasonNumber == season).ToList();
var commonStatusList = episodes.Select(s => s.Status).Distinct().ToList(); var commonStatusList = episodesInSeason.Select(s => s.Status).Distinct().ToList();
var commonStatus = commonStatusList.Count > 1 ? "Missing" : commonStatusList.First().ToString(); var commonStatus = commonStatusList.Count > 1 ? "Missing" : commonStatusList.First().ToString();
seasons.Add(new SeasonModel seasons.Add(new SeasonModel

Loading…
Cancel
Save