mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fancy grid, well getting there anyways.
Cell colour only in the "Command" column. Cell colour toggles when ignored is toggled.
This commit is contained in:
@@ -185,10 +185,17 @@ namespace NzbDrone.Web.Controllers
|
||||
|
||||
foreach (var season in episodes.Select(s => s.SeasonNumber).Distinct())
|
||||
{
|
||||
var episodesInSeason = episodes.Where(e => e.SeasonNumber == season).ToList();
|
||||
var commonStatusList = episodes.Select(s => s.Status).Distinct().ToList();
|
||||
var commonStatus = commonStatusList.Count > 1 ? "Missing" : commonStatusList.First().ToString();
|
||||
|
||||
seasons.Add(new SeasonModel
|
||||
{
|
||||
SeasonNumber = season,
|
||||
Episodes = GetEpisodeModels(episodes.Where(e => e.SeasonNumber == season).ToList()).OrderByDescending(e=> e.EpisodeNumber).ToList()
|
||||
SeriesId = seriesId,
|
||||
SeasonNumber = season,
|
||||
Episodes = GetEpisodeModels(episodesInSeason).OrderByDescending(e=> e.EpisodeNumber).ToList(),
|
||||
AnyWanted = episodesInSeason.Any(e => !e.Ignored),
|
||||
CommonStatus = commonStatus
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user