From e5076760885c90881e6997b4b6ffe36dbe03a59e Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Mon, 14 Apr 2025 09:29:30 -0300 Subject: [PATCH] fix: adjust chunk and buffer sizes --- python_rpc/http_downloader.py | 4 ++-- python_rpc/main.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python_rpc/http_downloader.py b/python_rpc/http_downloader.py index 63c6e914..22c4cafc 100644 --- a/python_rpc/http_downloader.py +++ b/python_rpc/http_downloader.py @@ -14,8 +14,8 @@ class HttpDownloader: cmd.append(url) cmd.extend([ - "--chunk-size", "42", - "--buffer-size", "16", + "--chunk-size", "16", + "--buffer-size", "24", "--force-download", "--log", "--silent" diff --git a/python_rpc/main.py b/python_rpc/main.py index 864b4e50..b820a284 100644 --- a/python_rpc/main.py +++ b/python_rpc/main.py @@ -36,7 +36,7 @@ if start_download_payload: http_downloader = HttpDownloader(hydra_httpdl_bin) downloads[initial_download['game_id']] = http_downloader try: - http_downloader.start_download(initial_download['url'], initial_download['save_path'], initial_download.get('header'), initial_download.get('allow_multiple_connections', False), initial_download.get('connections_limit', 24)) + http_downloader.start_download(initial_download['url'], initial_download['save_path'], initial_download.get('header'), initial_download.get('allow_multiple_connections', False), initial_download.get('connections_limit', 16)) except Exception as e: print("Error starting http download", e) @@ -148,11 +148,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('allow_multiple_connections', False), data.get('connections_limit', 24)) + existing_downloader.start_download(url, data['save_path'], data.get('header'), data.get('allow_multiple_connections', False), data.get('connections_limit', 16)) else: http_downloader = HttpDownloader(hydra_httpdl_bin) downloads[game_id] = http_downloader - http_downloader.start_download(url, data['save_path'], data.get('header'), data.get('allow_multiple_connections', False), data.get('connections_limit', 24)) + http_downloader.start_download(url, data['save_path'], data.get('header'), data.get('allow_multiple_connections', False), data.get('connections_limit', 16)) downloading_game_id = game_id