mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07: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:
parent
f065d345a5
commit
d7bc3a3734
6 changed files with 64 additions and 76 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue