fix: ensure HLS download shows progress > 0
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mini
2026-03-17 20:25:15 +08:00
parent b76f0aa1f6
commit 001e6b5239

View File

@@ -71,6 +71,10 @@ def _make_hook(task_id: str):
done_pct = int(sum(PHASE_WEIGHTS[:state["phase"]]) * 100)
_download_progress[task_id] = min(done_pct, 99)
# Ensure at least 1% progress so UI shows activity
if _download_progress.get(task_id, 0) == 0:
_download_progress[task_id] = 1
return hook
VIDEO_BASE_PATH = os.getenv("VIDEO_BASE_PATH", "/home/xdl/xdl_videos")