mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Revert "core: refactor http webclient part 14 #8529"
This reverts commit 4b983162fc
.
This commit is contained in:
@@ -42,10 +42,15 @@ namespace Jackett.Common.Plumbing
|
||||
// Register the best web client for the platform or the override
|
||||
switch (_runtimeSettings.ClientOverride)
|
||||
{
|
||||
case "httpclientnetcore":
|
||||
case "httpclient":
|
||||
RegisterWebClient<HttpWebClient>(builder);
|
||||
break;
|
||||
case "httpclient2netcore":
|
||||
case "httpclient2":
|
||||
RegisterWebClient<HttpWebClient2>(builder);
|
||||
break;
|
||||
default: // "httpclient"
|
||||
default:
|
||||
RegisterWebClient<HttpWebClient>(builder);
|
||||
break;
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ namespace Jackett.Server
|
||||
{
|
||||
public static void ProcessSettings(RuntimeSettings runtimeSettings, Logger logger)
|
||||
{
|
||||
if (runtimeSettings.ClientOverride != "httpclient" && runtimeSettings.ClientOverride != "httpclient2")
|
||||
if (runtimeSettings.ClientOverride != "httpclient" && runtimeSettings.ClientOverride != "httpclient2" && runtimeSettings.ClientOverride != "httpclientnetcore" && runtimeSettings.ClientOverride != "httpclient2netcore")
|
||||
{
|
||||
logger.Error($"Client override ({runtimeSettings.ClientOverride}) has been deprecated, please remove it from your start arguments");
|
||||
Environment.Exit(1);
|
||||
|
@@ -46,7 +46,16 @@ namespace Jackett.Server
|
||||
optionsResult.WithParsed(options =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.Client))
|
||||
options.Client = DotNetCoreUtil.IsRunningOnDotNetCore ? "httpclient2" : "httpclient";
|
||||
{
|
||||
if (DotNetCoreUtil.IsRunningOnDotNetCore)
|
||||
{
|
||||
options.Client = "httpclient2netcore";
|
||||
}
|
||||
else
|
||||
{
|
||||
options.Client = "httpclient";
|
||||
}
|
||||
}
|
||||
|
||||
Settings = options.ToRunTimeSettings();
|
||||
consoleOptions = options;
|
||||
|
Reference in New Issue
Block a user