add download speed limit setting

This commit is contained in:
2025-10-10 19:44:33 +02:00
parent d7d454a213
commit 573889721f
5 changed files with 26 additions and 8 deletions
+2 -2
View File
@@ -18,6 +18,7 @@ def run_aria2p():
def aria2server():
download_path = state.download_path
speed_limit = state.speed_limit
cmd = [
"aria2c",
@@ -26,11 +27,10 @@ def aria2server():
"--rpc-listen-all",
"--rpc-listen-port=6800",
f"--dir={download_path}",
f"--max-download-limit={speed_limit * 1024}",
"-x", str(state.aria2_threads),
"-s", str(state.aria2_threads),
]
aria2server = subprocess.Popen(cmd)
return aria2server