public void AutoIgnoreSeasons(int seriesId) { var episodeFiles = _mediaFileProvider.GetSeriesFiles(seriesId); if (episodeFiles.Count() != 0) { var seasons = _episodeProvider.GetSeasons(seriesId); var currentSeasons = seasons.Max(); foreach (var season in seasons) { if (season != currentSeasons && !episodeFiles.Any(e => e.SeasonNumber == season)) { _seasonProvider.SetIgnore(seriesId, season, true); } } } }
public EmptyResult SaveSeasonIgnore(int seriesId, int seasonNumber, bool ignored) { _seasonProvider.SetIgnore(seriesId, seasonNumber, ignored); return(new EmptyResult()); }