mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 06:03:09 +00:00
core: refactor http webclient part 14 #8529
Remove old http webclients references
This commit is contained in:
parent
4d63fa81d5
commit
4b983162fc
3 changed files with 3 additions and 17 deletions
|
@ -42,15 +42,10 @@ 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:
|
||||
default: // "httpclient"
|
||||
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" && runtimeSettings.ClientOverride != "httpclientnetcore" && runtimeSettings.ClientOverride != "httpclient2netcore")
|
||||
if (runtimeSettings.ClientOverride != "httpclient" && runtimeSettings.ClientOverride != "httpclient2")
|
||||
{
|
||||
logger.Error($"Client override ({runtimeSettings.ClientOverride}) has been deprecated, please remove it from your start arguments");
|
||||
Environment.Exit(1);
|
||||
|
|
|
@ -46,16 +46,7 @@ namespace Jackett.Server
|
|||
optionsResult.WithParsed(options =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.Client))
|
||||
{
|
||||
if (DotNetCoreUtil.IsRunningOnDotNetCore)
|
||||
{
|
||||
options.Client = "httpclient2netcore";
|
||||
}
|
||||
else
|
||||
{
|
||||
options.Client = "httpclient";
|
||||
}
|
||||
}
|
||||
options.Client = DotNetCoreUtil.IsRunningOnDotNetCore ? "httpclient2" : "httpclient";
|
||||
|
||||
Settings = options.ToRunTimeSettings();
|
||||
consoleOptions = options;
|
||||
|
|
Loading…
Add table
Reference in a new issue