diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-07-06 17:01:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-06 17:01:35 -0400 |
| commit | 4f17ed961e2756e0c65b1bb0246e7f62a5f44a8a (patch) | |
| tree | 7cf5c09548c788d77da61dde6f70d78b0c0f3800 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 54c6f02ebb40523bda6a6ee2375037146556a0c7 (diff) | |
| parent | 5fc4ad6c4e9aab8246e70a064c8506d050cf2147 (diff) | |
Merge pull request #1514 from Bond-009/httpclient2v10.3.6
Fix issues with HttpClientManager
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 02d661d15..c64922a93 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -430,7 +430,7 @@ namespace Emby.Server.Implementations /// Gets the current application user agent /// </summary> /// <value>The application user agent.</value> - public string ApplicationUserAgent => Name.Replace(' ','-') + "/" + ApplicationVersion; + public string ApplicationUserAgent => Name.Replace(' ','-') + '/' + ApplicationVersion; /// <summary> /// Gets the email address for use within a comment section of a user agent field. @@ -690,11 +690,6 @@ namespace Emby.Server.Implementations await HttpServer.RequestHandler(req, request.GetDisplayUrl(), request.Host.ToString(), localPath, CancellationToken.None).ConfigureAwait(false); } - protected virtual IHttpClient CreateHttpClient() - { - return new HttpClientManager.HttpClientManager(ApplicationPaths, LoggerFactory, FileSystemManager, () => ApplicationUserAgent); - } - public static IStreamHelper StreamHelper { get; set; } /// <summary> @@ -720,7 +715,11 @@ namespace Emby.Server.Implementations serviceCollection.AddSingleton(FileSystemManager); serviceCollection.AddSingleton<TvDbClientManager>(); - HttpClient = CreateHttpClient(); + HttpClient = new HttpClientManager.HttpClientManager( + ApplicationPaths, + LoggerFactory.CreateLogger<HttpClientManager.HttpClientManager>(), + FileSystemManager, + () => ApplicationUserAgent); serviceCollection.AddSingleton(HttpClient); serviceCollection.AddSingleton(NetworkManager); |
