diff --git a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs index 924cd980b4..34435402fb 100644 --- a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs @@ -48,6 +48,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The json serializer. /// The HTTP client. + /// The Log manager /// jsonSerializer public MovieDbProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogManager logManager) : base(logManager) @@ -188,6 +189,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// The json provider /// protected MovieProviderFromJson JsonProvider; + /// /// Sets the persisted last refresh date on the item for this provider. /// @@ -273,6 +275,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// if set to true [force]. + /// The cancellation token /// Task{System.Boolean}. protected override async Task FetchAsyncInternal(BaseItem item, bool force, CancellationToken cancellationToken) { @@ -382,6 +385,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The production year. + /// The cancellation token /// Task{System.String}. public async Task FindId(BaseItem item, int? productionYear, CancellationToken cancellationToken) { @@ -465,6 +469,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// The name. /// The year. /// The language. + /// The cancellation token /// Task{System.String}. public virtual async Task AttemptFindId(string name, int? year, string language, CancellationToken cancellationToken) { @@ -505,7 +510,7 @@ namespace MediaBrowser.Controller.Providers.Movies try { - using (Stream json = await HttpClient.Get(url3, Kernel.Instance.ResourcePools.MovieDb, cancellationToken).ConfigureAwait(false)) + using (var json = await HttpClient.Get(url3, Kernel.Instance.ResourcePools.MovieDb, cancellationToken).ConfigureAwait(false)) { searchResult = JsonSerializer.DeserializeFromStream(json); } @@ -544,7 +549,7 @@ namespace MediaBrowser.Controller.Providers.Movies try { - using (Stream json = await HttpClient.Get(url3, Kernel.Instance.ResourcePools.MovieDb, cancellationToken).ConfigureAwait(false)) + using (var json = await HttpClient.Get(url3, Kernel.Instance.ResourcePools.MovieDb, cancellationToken).ConfigureAwait(false)) { var response = JsonSerializer.DeserializeFromStream(json); @@ -613,6 +618,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// The name. /// The year. /// The language. + /// The cancellation token /// Task{System.String}. protected async Task GetBoxsetIdFromMovie(string name, int? year, string language, CancellationToken cancellationToken) { @@ -630,7 +636,7 @@ namespace MediaBrowser.Controller.Providers.Movies if (movieResult != null && movieResult.belongs_to_collection != null) { - id = movieResult.belongs_to_collection.id.ToString(); + id = movieResult.belongs_to_collection.id.ToString(CultureInfo.InvariantCulture); } else { @@ -650,6 +656,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The id. + /// The cancellation token /// Task. protected async Task FetchMovieData(BaseItem item, string id, CancellationToken cancellationToken) { @@ -712,12 +719,13 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The id. + /// The cancellation token /// Task{CompleteMovieData}. protected async Task FetchMainResult(BaseItem item, string id, CancellationToken cancellationToken) { ItemType = item is BoxSet ? "collection" : "movie"; string url = string.Format(GetInfo3, id, ApiKey, Kernel.Instance.Configuration.PreferredMetadataLanguage, ItemType); - CompleteMovieData mainResult = null; + CompleteMovieData mainResult; cancellationToken.ThrowIfCancellationRequested(); @@ -779,11 +787,12 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The id. + /// The cancellation token /// Task{TmdbCastResult}. protected async Task FetchCastInfo(BaseItem item, string id, CancellationToken cancellationToken) { //get cast and crew info - var url = string.Format(CastInfo, id, ApiKey, ItemType); + var url = string.Format(CastInfo, id, ApiKey); TmdbCastResult cast = null; cancellationToken.ThrowIfCancellationRequested(); @@ -806,6 +815,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The id. + /// The cancellation token /// Task{TmdbReleasesResult}. protected async Task FetchReleaseInfo(BaseItem item, string id, CancellationToken cancellationToken) { @@ -833,6 +843,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The id. + /// The cancellation token /// Task{TmdbImages}. protected async Task FetchImageInfo(BaseItem item, string id, CancellationToken cancellationToken) { @@ -957,6 +968,7 @@ namespace MediaBrowser.Controller.Providers.Movies /// /// The item. /// The images. + /// The cancellation token /// Task. protected virtual async Task ProcessImages(BaseItem item, TmdbImages images, CancellationToken cancellationToken) { @@ -1123,7 +1135,7 @@ namespace MediaBrowser.Controller.Providers.Movies var sb = new StringBuilder(); foreach (var c in name) { - if ((int)c >= 0x2B0 && (int)c <= 0x0333) + if (c >= 0x2B0 && c <= 0x0333) { // skip char modifier and diacritics } diff --git a/MediaBrowser.sln b/MediaBrowser.sln index 0fe54d0059..b473b20625 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -253,7 +253,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal