diff --git a/frontend/templates/index.html b/frontend/templates/index.html index b006d78..b90ee5f 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -218,7 +218,10 @@ async function handleDownload(formData) { let label = 'Downloading source file... ' + gb + ' GiB'; if (pdata.speed_mbps) label += ' (' + pdata.speed_mbps + ' MB/s)'; if (pdata.eta) label += ' — ' + pdata.eta; - setPhase(label, 0, true); + // Show percentage if we know total size + const totalGb = pdata.content_length_gb; + const pct = totalGb ? Math.round((pdata.file_size_gb / totalGb) * 100) : 0; + setPhase(label, pct, totalGb ? false : true); } } catch (_) { /* keep polling */ } }