From 2ee3bebfc78aad5795ceeba1ed6e64b262e68131 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Wed, 9 Apr 2025 11:20:42 -0300 Subject: [PATCH 1/2] fix: remove allow_multiple_connections from download options --- python_rpc/http_downloader.py | 9 +-------- src/main/services/download/download-manager.ts | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/python_rpc/http_downloader.py b/python_rpc/http_downloader.py index 4358373e..c5d5f85b 100644 --- a/python_rpc/http_downloader.py +++ b/python_rpc/http_downloader.py @@ -11,7 +11,7 @@ class HttpDownloader: ) ) - def start_download(self, url: str, save_path: str, header: str, out: str = None, allow_multiple_connections: bool = False): + def start_download(self, url: str, save_path: str, header: str, out: str = None): if self.download: self.aria2.resume([self.download]) else: @@ -20,13 +20,6 @@ class HttpDownloader: "dir": save_path, "out": out } - - if allow_multiple_connections: - options.update({ - "split": "16", - "max-connection-per-server": "16", - "min-split-size": "1M" - }) downloads = self.aria2.add(url, options=options) diff --git a/src/main/services/download/download-manager.ts b/src/main/services/download/download-manager.ts index 7401683e..424617df 100644 --- a/src/main/services/download/download-manager.ts +++ b/src/main/services/download/download-manager.ts @@ -372,7 +372,6 @@ export class DownloadManager { game_id: downloadId, url: downloadUrl, save_path: download.downloadPath, - allow_multiple_connections: true, }; } case Downloader.TorBox: { @@ -385,7 +384,6 @@ export class DownloadManager { url, save_path: download.downloadPath, out: name, - allow_multiple_connections: true, }; } case Downloader.Hydra: { @@ -400,7 +398,6 @@ export class DownloadManager { game_id: downloadId, url: downloadUrl, save_path: download.downloadPath, - allow_multiple_connections: true, }; } } From 7c468ac9bbbc22e42a22bc7de7840356aff88bfe Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Wed, 9 Apr 2025 11:29:12 -0300 Subject: [PATCH 2/2] fix: remove allow_multiple_connections from download method --- python_rpc/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_rpc/main.py b/python_rpc/main.py index 915f1670..94c34e17 100644 --- a/python_rpc/main.py +++ b/python_rpc/main.py @@ -147,11 +147,11 @@ def action(): torrent_downloader.start_download(url, data['save_path']) else: if existing_downloader and isinstance(existing_downloader, HttpDownloader): - existing_downloader.start_download(url, data['save_path'], data.get('header'), data.get('out'), data.get('allow_multiple_connections', False)) + existing_downloader.start_download(url, data['save_path'], data.get('header'), data.get('out')) else: http_downloader = HttpDownloader() downloads[game_id] = http_downloader - http_downloader.start_download(url, data['save_path'], data.get('header'), data.get('out'), data.get('allow_multiple_connections', False)) + http_downloader.start_download(url, data['save_path'], data.get('header'), data.get('out')) downloading_game_id = game_id