TraktPlugin.GUI.GUIPopularShows.FilterPopularShows C# (CSharp) Méthode

FilterPopularShows() private méthode

private FilterPopularShows ( IEnumerable showsToFilter ) : IEnumerable
showsToFilter IEnumerable
Résultat IEnumerable
        private IEnumerable<TraktShowSummary> FilterPopularShows(IEnumerable<TraktShowSummary> showsToFilter)
        {
            if (TraktSettings.PopularShowsHideWatched)
                showsToFilter = showsToFilter.Where(s => !s.IsWatched());

            if (TraktSettings.PopularShowsHideWatchlisted)
                showsToFilter = showsToFilter.Where(s => !s.IsWatchlisted());

            if (TraktSettings.PopularShowsHideCollected)
                showsToFilter = showsToFilter.Where(s => !s.IsCollected());

            if (TraktSettings.PopularShowsHideRated)
                showsToFilter = showsToFilter.Where(s => s.UserRating() == null);

            return showsToFilter;
        }