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

RemoveShowFromWatchlist() static private méthode

static private RemoveShowFromWatchlist ( TraktShow show ) : void
show TraktPlugin.TraktAPI.DataStructures.TraktShow
Résultat void
        internal static void RemoveShowFromWatchlist(TraktShow show)
        {
            if (_WatchListShows == null || show.Ids == null)
                return;

            var watchlistShows = _WatchListShows.ToList();
            watchlistShows.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));

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

            _WatchListShows = watchlistShows;
        }
TraktCache