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

RemoveShowFromWatchedHistory() static private méthode

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

            var watchedEpisodes = _WatchedEpisodes.ToList();
            watchedEpisodes.RemoveAll(s => ((s.ShowId == show.Ids.Trakt) && s.ShowId != null) ||
                                           ((s.ShowImdbId == show.Ids.Imdb) && s.ShowImdbId.ToNullIfEmpty() != null) ||
                                           ((s.ShowTvdbId == show.Ids.Tvdb) && s.ShowTvdbId != null));

            // remove using Title + Year
            if (show.Ids.Trakt == null && show.Ids.Imdb.ToNullIfEmpty() == null && show.Ids.Tvdb == null)
            {
                watchedEpisodes.RemoveAll(e => e.ShowTitle.ToLowerInvariant() == show.Title.ToLower() && e.ShowYear == show.Year);
            }

            _WatchedEpisodes = watchedEpisodes;
        }
TraktCache