fix: adjust chunk and buffer sizes

This commit is contained in:
Hachi-R
2025-04-14 09:29:30 -03:00
parent f3c7010930
commit e507676088
2 changed files with 5 additions and 5 deletions

View File

@@ -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"

View File

@@ -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