Browse Source

fix some easy warnings for tmdb

dkanada 5 years ago
parent
commit
855a2b2892

+ 3 - 0
MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs

@@ -105,6 +105,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                 {
                     return 3;
                 }
+
                 if (!isLanguageEn)
                 {
                     if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase))
@@ -112,10 +113,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                         return 2;
                     }
                 }
+
                 if (string.IsNullOrEmpty(i.Language))
                 {
                     return isLanguageEn ? 3 : 2;
                 }
+
                 return 0;
             })
                 .ThenByDescending(i => i.CommunityRating ?? 0)

+ 1 - 4
MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs

@@ -78,9 +78,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                 var result = new RemoteSearchResult
                 {
                     Name = info.Name,
-
                     SearchProviderName = Name,
-
                     ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].File_Path)
                 };
 
@@ -191,7 +189,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                 Url = url,
                 CancellationToken = cancellationToken,
                 AcceptHeader = TmdbUtils.AcceptHeader
-
             }).ConfigureAwait(false))
             {
                 using (var json = response.Content)
@@ -219,7 +216,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                         Url = url,
                         CancellationToken = cancellationToken,
                         AcceptHeader = TmdbUtils.AcceptHeader
-
                     }).ConfigureAwait(false))
                     {
                         using (var json = response.Content)
@@ -229,6 +225,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
                     }
                 }
             }
+
             return mainResult;
         }
 

+ 3 - 3
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs

@@ -80,7 +80,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 RatingType = RatingType.Score
             }));
 
-
             var isLanguageEn = string.Equals(language, "en", StringComparison.OrdinalIgnoreCase);
 
             return list.OrderByDescending(i =>
@@ -89,6 +88,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 {
                     return 3;
                 }
+
                 if (!isLanguageEn)
                 {
                     if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase))
@@ -96,15 +96,16 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                         return 2;
                     }
                 }
+
                 if (string.IsNullOrEmpty(i.Language))
                 {
                     return isLanguageEn ? 3 : 2;
                 }
+
                 return 0;
             })
                 .ThenByDescending(i => i.CommunityRating ?? 0)
                 .ThenByDescending(i => i.VoteCount ?? 0);
-
         }
 
         private IEnumerable<Still> GetPosters(StillImages images)
@@ -112,7 +113,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
             return images.Stills ?? new List<Still>();
         }
 
-
         public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
         {
             return GetResponse(url, cancellationToken);

+ 1 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs

@@ -203,6 +203,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
         {
             return GetResponse(url, cancellationToken);
         }
+
         // After TheTvDb
         public int Order => 1;
 

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProviderBase.cs

@@ -53,6 +53,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
             {
                 throw new ArgumentNullException(nameof(tmdbId));
             }
+
             if (string.IsNullOrEmpty(language))
             {
                 throw new ArgumentNullException(nameof(language));
@@ -80,6 +81,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
             {
                 throw new ArgumentNullException(nameof(tmdbId));
             }
+
             if (string.IsNullOrEmpty(preferredLanguage))
             {
                 throw new ArgumentNullException(nameof(preferredLanguage));

+ 2 - 1
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs

@@ -145,6 +145,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
             {
                 throw new ArgumentNullException(nameof(tmdbId));
             }
+
             if (string.IsNullOrEmpty(language))
             {
                 throw new ArgumentNullException(nameof(language));
@@ -172,6 +173,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
             {
                 throw new ArgumentNullException(nameof(tmdbId));
             }
+
             if (string.IsNullOrEmpty(preferredLanguage))
             {
                 throw new ArgumentNullException(nameof(preferredLanguage));
@@ -216,7 +218,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 Url = url,
                 CancellationToken = cancellationToken,
                 AcceptHeader = TmdbUtils.AcceptHeader
-
             }).ConfigureAwait(false))
             {
                 using (var json = response.Content)

+ 4 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs

@@ -99,6 +99,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 {
                     return 3;
                 }
+
                 if (!isLanguageEn)
                 {
                     if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase))
@@ -106,10 +107,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                         return 2;
                     }
                 }
+
                 if (string.IsNullOrEmpty(i.Language))
                 {
                     return isLanguageEn ? 3 : 2;
                 }
+
                 return 0;
             })
                 .ThenByDescending(i => i.CommunityRating ?? 0)
@@ -171,6 +174,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
 
             return null;
         }
+
         // After tvdb and fanart
         public int Order => 2;
 

+ 2 - 3
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs

@@ -263,10 +263,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 {
                     series.SetProviderId(MetadataProviders.Imdb, ids.Imdb_Id);
                 }
+
                 if (ids.Tvrage_Id > 0)
                 {
                     series.SetProviderId(MetadataProviders.TvRage, ids.Tvrage_Id.ToString(_usCulture));
                 }
+
                 if (ids.Tvdb_Id > 0)
                 {
                     series.SetProviderId(MetadataProviders.Tvdb, ids.Tvdb_Id.ToString(_usCulture));
@@ -416,7 +418,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 Url = url,
                 CancellationToken = cancellationToken,
                 AcceptHeader = TmdbUtils.AcceptHeader
-
             }).ConfigureAwait(false))
             {
                 using (var json = response.Content)
@@ -453,7 +454,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                     Url = url,
                     CancellationToken = cancellationToken,
                     AcceptHeader = TmdbUtils.AcceptHeader
-
                 }).ConfigureAwait(false))
                 {
                     using (var json = response.Content)
@@ -518,7 +518,6 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
                 Url = url,
                 CancellationToken = cancellationToken,
                 AcceptHeader = TmdbUtils.AcceptHeader
-
             }).ConfigureAwait(false))
             {
                 using (var json = response.Content)

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs

@@ -5,7 +5,7 @@ using MediaBrowser.Providers.Plugins.Tmdb.Models.General;
 namespace MediaBrowser.Providers.Plugins.Tmdb
 {
     /// <summary>
-    /// Utilities for the TMDb provider
+    /// Utilities for the TMDb provider.
     /// </summary>
     public static class TmdbUtils
     {