From 1dff44f9d44e71545ff02631f66052ff06796f9a Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Tue, 10 May 2022 18:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80aria=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs | 8 ++++---- DownKyi.Core/Settings/SettingsManager.Network.cs | 2 +- DownKyi/Services/Download/AriaDownloadService.cs | 10 +++++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs b/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs index e11bb49..0bcc88f 100644 --- a/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs +++ b/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs @@ -36,11 +36,11 @@ namespace DownKyi.Core.Aria2cNet.Client.Entity [JsonProperty("dir")] public string Dir { get; set; } - [JsonProperty("header")] - public string Header { get; set; } + //[JsonProperty("header")] + //public string Header { get; set; } - [JsonProperty("use-head")] - public string UseHead { get; set; } + //[JsonProperty("use-head")] + //public string UseHead { get; set; } [JsonProperty("user-agent")] public string UserAgent { get; set; } diff --git a/DownKyi.Core/Settings/SettingsManager.Network.cs b/DownKyi.Core/Settings/SettingsManager.Network.cs index 37842de..f7786d2 100644 --- a/DownKyi.Core/Settings/SettingsManager.Network.cs +++ b/DownKyi.Core/Settings/SettingsManager.Network.cs @@ -8,7 +8,7 @@ namespace DownKyi.Core.Settings private readonly AllowStatus isLiftingOfRegion = AllowStatus.YES; // Aria服务器端口号 - private readonly int ariaListenPort = 6801; + private readonly int ariaListenPort = 6800; // Aria日志等级 private readonly AriaConfigLogLevel ariaLogLevel = AriaConfigLogLevel.INFO; diff --git a/DownKyi/Services/Download/AriaDownloadService.cs b/DownKyi/Services/Download/AriaDownloadService.cs index 9981b2f..0bee235 100644 --- a/DownKyi/Services/Download/AriaDownloadService.cs +++ b/DownKyi/Services/Download/AriaDownloadService.cs @@ -952,7 +952,7 @@ namespace DownKyi.Services.Download Token = "downkyi", LogLevel = SettingsManager.GetInstance().GetAriaLogLevel(), MaxConcurrentDownloads = SettingsManager.GetInstance().GetAriaMaxConcurrentDownloads(), - MaxConnectionPerServer = 16, // 最大取16 + MaxConnectionPerServer = 8, // 最大取16 Split = SettingsManager.GetInstance().GetAriaSplit(), //MaxTries = 5, MinSplitSize = 10, // 10MB @@ -983,11 +983,15 @@ namespace DownKyi.Services.Download { // 暂停所有下载 var ariaPause = await AriaClient.PauseAllAsync(); +#if DEBUG Core.Utils.Debugging.Console.PrintLine(ariaPause.ToString()); +#endif // 关闭服务器 bool close = AriaServer.CloseServer(); +#if DEBUG Core.Utils.Debugging.Console.PrintLine(close); +#endif } /// @@ -1025,8 +1029,8 @@ namespace DownKyi.Services.Download //HttpProxy = $"http://{Settings.GetAriaHttpProxy()}:{Settings.GetAriaHttpProxyListenPort()}", Dir = path, Out = localFileName, - Header = $"cookie: {LoginHelper.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com", - UseHead = "true", + //Header = $"cookie: {LoginHelper.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com", + //UseHead = "true", UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", };