Move HttpWebClientNetCore to Jackett.Common

This commit is contained in:
flightlevel
2018-08-31 20:04:36 +10:00
parent 50a09189e4
commit 9e78f46010
4 changed files with 2 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ namespace Jackett.Common.Plumbing
switch (_runtimeSettings.ClientOverride)
{
case "httpclientnetcore":
// do nothing, registered by the netcore app
RegisterWebClient<HttpWebClientNetCore>(builder);
break;
case "httpclient":
RegisterWebClient<HttpWebClient>(builder);

View File

@@ -47,7 +47,6 @@ namespace Jackett.Server
{
if (string.IsNullOrEmpty(options.Client))
{
//TODO: Remove libcurl once off owin
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
if (runningOnDotNetCore)

View File

@@ -3,7 +3,6 @@ using Autofac.Extensions.DependencyInjection;
using Jackett.Common.Models.Config;
using Jackett.Common.Plumbing;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
using Jackett.Server.Middleware;
using Jackett.Server.Services;
using Microsoft.AspNetCore.Authentication.Cookies;
@@ -84,8 +83,6 @@ namespace Jackett.Server
builder.RegisterType<ServerService>().As<IServerService>();
builder.RegisterType<ProtectionService>().As<IProtectionService>();
builder.RegisterType<ServiceConfigService>().As<IServiceConfigService>();
if (runtimeSettings.ClientOverride == "httpclientnetcore")
builder.RegisterType<HttpWebClientNetCore>().As<WebClient>();
IContainer container = builder.Build();
Helper.ApplicationContainer = container;