From df084bcebe83333c6587318ec2531007ca202338 Mon Sep 17 00:00:00 2001 From: GabbeHags <38500419+GabbeHags@users.noreply.github.com> Date: Sun, 15 Sep 2024 21:04:55 +0200 Subject: [PATCH] download limit now takes in to consideration total active downloads --- .../Services/Downloaders/InternalDownloader.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs b/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs index 98cc1ba..74408b5 100644 --- a/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs +++ b/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs @@ -26,7 +26,7 @@ public class InternalDownloader : IDownloader _uri = uri; _filePath = filePath; - + _downloadConfiguration = new(); SetSettings(); @@ -131,14 +131,14 @@ public class InternalDownloader : IDownloader { settingDownloadParallelCount = 1; } - + var settingDownloadMaxSpeed = Settings.Get.DownloadClient.MaxSpeed; if (settingDownloadMaxSpeed <= 0) { settingDownloadMaxSpeed = 0; } - + settingDownloadMaxSpeed = settingDownloadMaxSpeed / Math.Max(TorrentRunner.ActiveDownloadClients.Count, 1); settingDownloadMaxSpeed = settingDownloadMaxSpeed * 1024 * 1024; var settingDownloadTimeout = Settings.Get.DownloadClient.Timeout;