aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs')
-rw-r--r--MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs37
1 files changed, 16 insertions, 21 deletions
diff --git a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs
index 0369e8ca1..e06d93520 100644
--- a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs
+++ b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs
@@ -1,25 +1,23 @@
-using MediaBrowser.Common.Configuration;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
-using Microsoft.Extensions.Logging;
+using MediaBrowser.Model.Globalization;
+using MediaBrowser.Model.IO;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-using MediaBrowser.Controller.IO;
-using MediaBrowser.Model.IO;
-using MediaBrowser.Model.Globalization;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.BoxSets
{
@@ -50,7 +48,7 @@ namespace MediaBrowser.Providers.BoxSets
}
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
-
+
public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(BoxSetInfo searchInfo, CancellationToken cancellationToken)
{
var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb);
@@ -73,7 +71,7 @@ namespace MediaBrowser.Providers.BoxSets
Name = info.name,
SearchProviderName = Name,
-
+
ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].file_path)
};
@@ -122,7 +120,7 @@ namespace MediaBrowser.Providers.BoxSets
{
if (string.IsNullOrEmpty(tmdbId))
{
- throw new ArgumentNullException("tmdbId");
+ throw new ArgumentNullException(nameof(tmdbId));
}
await EnsureInfo(tmdbId, language, cancellationToken).ConfigureAwait(false);
@@ -158,7 +156,7 @@ namespace MediaBrowser.Providers.BoxSets
var dataFilePath = GetDataFilePath(_config.ApplicationPaths, tmdbId, preferredMetadataLanguage);
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(dataFilePath));
+ _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(dataFilePath));
_json.SerializeToFile(mainResult, dataFilePath);
}
@@ -243,10 +241,7 @@ namespace MediaBrowser.Providers.BoxSets
return DownloadInfo(tmdbId, preferredMetadataLanguage, cancellationToken);
}
- public string Name
- {
- get { return "TheMovieDb"; }
- }
+ public string Name => "TheMovieDb";
private static string GetDataFilePath(IApplicationPaths appPaths, string tmdbId, string preferredLanguage)
{