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

RemoveShowFromCollection() static private méthode

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

            var collectedEpisodes = _CollectedEpisodes.ToList();
            collectedEpisodes.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)
            {
                collectedEpisodes.RemoveAll(e => e.ShowTitle.ToLowerInvariant() == show.Title.ToLower() && e.ShowYear == show.Year);
            }

            _CollectedEpisodes = collectedEpisodes;
        }
TraktCache