download limit now takes in to consideration total active downloads
This commit is contained in:
parent
35f959ee26
commit
df084bcebe
1 changed files with 3 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ public class InternalDownloader : IDownloader
|
||||||
|
|
||||||
_uri = uri;
|
_uri = uri;
|
||||||
_filePath = filePath;
|
_filePath = filePath;
|
||||||
|
|
||||||
_downloadConfiguration = new();
|
_downloadConfiguration = new();
|
||||||
|
|
||||||
SetSettings();
|
SetSettings();
|
||||||
|
|
@ -131,14 +131,14 @@ public class InternalDownloader : IDownloader
|
||||||
{
|
{
|
||||||
settingDownloadParallelCount = 1;
|
settingDownloadParallelCount = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var settingDownloadMaxSpeed = Settings.Get.DownloadClient.MaxSpeed;
|
var settingDownloadMaxSpeed = Settings.Get.DownloadClient.MaxSpeed;
|
||||||
|
|
||||||
if (settingDownloadMaxSpeed <= 0)
|
if (settingDownloadMaxSpeed <= 0)
|
||||||
{
|
{
|
||||||
settingDownloadMaxSpeed = 0;
|
settingDownloadMaxSpeed = 0;
|
||||||
}
|
}
|
||||||
|
settingDownloadMaxSpeed = settingDownloadMaxSpeed / Math.Max(TorrentRunner.ActiveDownloadClients.Count, 1);
|
||||||
settingDownloadMaxSpeed = settingDownloadMaxSpeed * 1024 * 1024;
|
settingDownloadMaxSpeed = settingDownloadMaxSpeed * 1024 * 1024;
|
||||||
|
|
||||||
var settingDownloadTimeout = Settings.Get.DownloadClient.Timeout;
|
var settingDownloadTimeout = Settings.Get.DownloadClient.Timeout;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue