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

RemoveShowFromRatings() static private méthode

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

            var ratedShows = _RatedShows.ToList();
            ratedShows.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)
            {
                ratedShows.RemoveAll(s => s.Show.Title.ToLowerInvariant() == show.Title.ToLower() && s.Show.Year == show.Year);
            }

            _RatedShows = ratedShows;
        }
TraktCache