From ce8754d05286f0cebf4710da928f91167137ddb2 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 19 Dec 2019 19:58:00 +0100 Subject: [PATCH] Refactor list of RemoteImageInfo --- MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs b/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs index 747676966..51db2fb13 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs @@ -55,8 +55,6 @@ namespace MediaBrowser.Providers.Tmdb.TV var seriesId = series != null ? series.GetProviderId(MetadataProviders.Tmdb) : null; - var list = new List(); - if (string.IsNullOrEmpty(seriesId)) { return Enumerable.Empty(); @@ -77,7 +75,7 @@ namespace MediaBrowser.Providers.Tmdb.TV var tmdbImageUrl = tmdbSettings.images.GetImageUrl("original"); - list.AddRange(results.Select(i => new RemoteImageInfo + var list = results.Select(i => new RemoteImageInfo { Url = tmdbImageUrl + i.File_Path, CommunityRating = i.Vote_Average, @@ -88,8 +86,7 @@ namespace MediaBrowser.Providers.Tmdb.TV ProviderName = Name, Type = ImageType.Primary, RatingType = RatingType.Score - }).ToList()); - + }).ToList(); var isLanguageEn = string.Equals(language, "en", StringComparison.OrdinalIgnoreCase);