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

RemoveMovieFromWatchlist() static private méthode

static private RemoveMovieFromWatchlist ( TraktMovie movie ) : void
movie TraktPlugin.TraktAPI.DataStructures.TraktMovie
Résultat void
        internal static void RemoveMovieFromWatchlist(TraktMovie movie)
        {
            if (_WatchListMovies == null || movie.Ids == null)
                return;

            var watchlistMovies = _WatchListMovies.ToList();
            watchlistMovies.RemoveAll(m => ((m.Movie.Ids.Trakt == movie.Ids.Trakt) && m.Movie.Ids.Trakt != null) ||
                                           ((m.Movie.Ids.Imdb == movie.Ids.Imdb) && m.Movie.Ids.Imdb.ToNullIfEmpty() != null) ||
                                           ((m.Movie.Ids.Tmdb == movie.Ids.Tmdb) && m.Movie.Ids.Tmdb != null));

            // remove using Title + Year
            if (movie.Ids.Trakt == null && movie.Ids.Imdb.ToNullIfEmpty() == null && movie.Ids.Tmdb == null)
            {
                watchlistMovies.RemoveAll(m => m.Movie.Title.ToLowerInvariant() == movie.Title.ToLower() && m.Movie.Year == movie.Year);
            }

            _WatchListMovies = watchlistMovies;
        }
TraktCache