From 9110eb41bd1e6eb85866bce14180cf036f23257e Mon Sep 17 00:00:00 2001 From: Claus Lohmar Date: Thu, 23 Jul 2026 11:19:13 +0000 Subject: [PATCH] feat: use aria2c for parallel downloads (8 connections, resumable) Replaces wget with aria2c -x8 -s8 for significantly faster downloads, especially on high-latency connections. Falls back to single-connection if the server doesn't support range requests. --- frontend/app.py | 8 ++++---- frontend/install.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/app.py b/frontend/app.py index 4694680..9dacec7 100644 --- a/frontend/app.py +++ b/frontend/app.py @@ -228,10 +228,10 @@ def session_upload( logger.info("Starting background download: %s → %s", url, dest) try: - proc = subprocess.Popen( - ["wget", "--progress=dot:giga", "-O", str(dest), url], - stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, - ) + proc = subprocess.Popen( + ["aria2c", "-x8", "-s8", "-d", str(dest.parent), "-o", dest.name, url], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + ) except Exception as exc: return JSONResponse({"phase": "error", "error": f"Failed to start download: {exc}"}, status_code=500) diff --git a/frontend/install.sh b/frontend/install.sh index 1322734..35cb1f8 100755 --- a/frontend/install.sh +++ b/frontend/install.sh @@ -37,6 +37,7 @@ REQUIRED=( python3-pip "pip3" wget "wget" curl "curl" + aria2 "aria2c" openssh-client "scp" sshpass "sshpass" )