TraktPlugin.TraktCache.RemoveSeasonFromWatchlist C# (CSharp) Méthode

RemoveSeasonFromWatchlist() static private méthode

static private RemoveSeasonFromWatchlist ( TraktShow show, TraktSeason season ) : void
show TraktPlugin.TraktAPI.DataStructures.TraktShow
season TraktPlugin.TraktAPI.DataStructures.TraktSeason
Résultat void
        internal static void RemoveSeasonFromWatchlist(TraktShow show, TraktSeason season)
        {
            if (_WatchListSeasons == null || show.Ids == null)
                return;

            var watchlistSeasons = _WatchListSeasons.ToList();
            watchlistSeasons.RemoveAll(s => (((s.Show.Ids.Trakt == show.Ids.Trakt) && s.Show.Ids.Trakt != null) ||
                                             ((s.Show.Ids.Imdb == show.Ids.Imdb) && s.Show.Ids.Imdb.ToNullIfEmpty() != null) ||
                                             ((s.Show.Ids.Tvdb == show.Ids.Tvdb) && s.Show.Ids.Tvdb != null)) &&
                                               s.Season.Number == season.Number);

            // remove using Title + Year
            if (show.Ids.Trakt == null && show.Ids.Imdb.ToNullIfEmpty() == null && show.Ids.Tvdb == null)
            {
                watchlistSeasons.RemoveAll(s => s.Show.Title.ToLowerInvariant() == show.Title.ToLower() && s.Show.Year == show.Year &&
                                                s.Season.Number == season.Number);
            }

            _WatchListSeasons = watchlistSeasons;
        }
TraktCache