mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Move HttpWebClientNetCore to Jackett.Common
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Jackett.Common.Plumbing
|
|||||||
switch (_runtimeSettings.ClientOverride)
|
switch (_runtimeSettings.ClientOverride)
|
||||||
{
|
{
|
||||||
case "httpclientnetcore":
|
case "httpclientnetcore":
|
||||||
// do nothing, registered by the netcore app
|
RegisterWebClient<HttpWebClientNetCore>(builder);
|
||||||
break;
|
break;
|
||||||
case "httpclient":
|
case "httpclient":
|
||||||
RegisterWebClient<HttpWebClient>(builder);
|
RegisterWebClient<HttpWebClient>(builder);
|
||||||
|
@@ -47,7 +47,6 @@ namespace Jackett.Server
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(options.Client))
|
if (string.IsNullOrEmpty(options.Client))
|
||||||
{
|
{
|
||||||
//TODO: Remove libcurl once off owin
|
|
||||||
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
|
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
|
||||||
|
|
||||||
if (runningOnDotNetCore)
|
if (runningOnDotNetCore)
|
||||||
|
@@ -3,7 +3,6 @@ using Autofac.Extensions.DependencyInjection;
|
|||||||
using Jackett.Common.Models.Config;
|
using Jackett.Common.Models.Config;
|
||||||
using Jackett.Common.Plumbing;
|
using Jackett.Common.Plumbing;
|
||||||
using Jackett.Common.Services.Interfaces;
|
using Jackett.Common.Services.Interfaces;
|
||||||
using Jackett.Common.Utils.Clients;
|
|
||||||
using Jackett.Server.Middleware;
|
using Jackett.Server.Middleware;
|
||||||
using Jackett.Server.Services;
|
using Jackett.Server.Services;
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
@@ -84,8 +83,6 @@ namespace Jackett.Server
|
|||||||
builder.RegisterType<ServerService>().As<IServerService>();
|
builder.RegisterType<ServerService>().As<IServerService>();
|
||||||
builder.RegisterType<ProtectionService>().As<IProtectionService>();
|
builder.RegisterType<ProtectionService>().As<IProtectionService>();
|
||||||
builder.RegisterType<ServiceConfigService>().As<IServiceConfigService>();
|
builder.RegisterType<ServiceConfigService>().As<IServiceConfigService>();
|
||||||
if (runtimeSettings.ClientOverride == "httpclientnetcore")
|
|
||||||
builder.RegisterType<HttpWebClientNetCore>().As<WebClient>();
|
|
||||||
|
|
||||||
IContainer container = builder.Build();
|
IContainer container = builder.Build();
|
||||||
Helper.ApplicationContainer = container;
|
Helper.ApplicationContainer = container;
|
||||||
|
Reference in New Issue
Block a user