diff options
| author | crobibero <cody@robibe.ro> | 2020-08-24 07:39:16 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-08-24 07:39:16 -0600 |
| commit | 9626101c9f8d0acceb2ecf97bed502c272d6e4f6 (patch) | |
| tree | 00d7edea6d98b2b36cd5487439ed15e4c9dcb491 /MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs | |
| parent | ef0a7c3e2a24519142c912837be4beefcd07e421 (diff) | |
| parent | 7ce21d436baa2ffe80e7723f3d0887db7a0eeaf1 (diff) | |
Merge remote-tracking branch 'upstream/master' into 3.1.7
Diffstat (limited to 'MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs')
| -rw-r--r-- | MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs index c41bd925e..f43444028 100644 --- a/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.Net; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Providers; @@ -20,11 +20,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets { public class TmdbBoxSetImageProvider : IRemoteImageProvider, IHasOrder { - private readonly IHttpClient _httpClient; + private readonly IHttpClientFactory _httpClientFactory; - public TmdbBoxSetImageProvider(IHttpClient httpClient) + public TmdbBoxSetImageProvider(IHttpClientFactory httpClientFactory) { - _httpClient = httpClient; + _httpClientFactory = httpClientFactory; } public string Name => ProviderName; @@ -153,13 +153,9 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets public int Order => 0; - public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken) + public Task<HttpResponseMessage> GetImageResponse(string url, CancellationToken cancellationToken) { - return _httpClient.GetResponse(new HttpRequestOptions - { - CancellationToken = cancellationToken, - Url = url - }); + return _httpClientFactory.CreateClient().GetAsync(url, cancellationToken); } } } |
