Skip to content

Commit

Permalink
core: refactor http webclient part 14 #8529
Browse files Browse the repository at this point in the history
Remove old http webclients references
  • Loading branch information
ngosang committed Sep 19, 2020
1 parent 4d63fa8 commit 4b98316
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
7 changes: 1 addition & 6 deletions src/Jackett.Common/Plumbing/JackettModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,10 @@ protected override void Load(ContainerBuilder builder)
// 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Server/Initialisation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class Initialisation
{
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);
Expand Down
11 changes: 1 addition & 10 deletions src/Jackett.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,7 @@ public static void Main(string[] args)
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;
Expand Down

0 comments on commit 4b98316

Please sign in to comment.