mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
fix: adjust chunk and buffer sizes
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user