From c3b9f97afcad81ea55ace0a24388e5d99ff3232b Mon Sep 17 00:00:00 2001 From: JohnBaumb <80135794+JohnBaumb@users.noreply.github.com> Date: Wed, 22 Apr 2026 15:21:11 -0700 Subject: [PATCH] Add analysis progress to downloads page batch cards --- web_server.py | 1 + webui/static/pages-extra.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web_server.py b/web_server.py index 249f7a2e..00bdce62 100644 --- a/web_server.py +++ b/web_server.py @@ -31444,6 +31444,7 @@ def get_all_downloads_unified(): 'phase': batch.get('phase', 'unknown'), 'total': len(queue), 'analysis_total': batch.get('analysis_total', len(queue)), + 'analysis_processed': batch.get('analysis_processed', 0), 'completed': sum(1 for s in statuses if s in ('completed', 'skipped', 'already_owned')), 'failed': sum(1 for s in statuses if s in ('failed', 'not_found', 'cancelled')), 'active': sum(1 for s in statuses if s in ('downloading', 'searching', 'post_processing')), diff --git a/webui/static/pages-extra.js b/webui/static/pages-extra.js index 78308696..2789f5ea 100644 --- a/webui/static/pages-extra.js +++ b/webui/static/pages-extra.js @@ -2488,6 +2488,10 @@ function _adlRenderBatchPanel() { const hasFailed = batch.failed > 0; const isTerminal = batch.phase === 'complete' || batch.phase === 'cancelled' || batch.phase === 'error'; const isActive = batch.phase === 'downloading' && batch.active > 0; + const isAnalyzing = batch.phase === 'analysis'; + const analysisTotal = batch.analysis_total || 0; + const analysisProcessed = batch.analysis_processed || 0; + const analysisPct = analysisTotal > 0 ? Math.round((analysisProcessed / analysisTotal) * 100) : 0; // Fade progress for completing batches let fadeStyle = ''; @@ -2511,7 +2515,7 @@ function _adlRenderBatchPanel() { phaseText = 'Queued'; phaseIcon = '⏳'; } else if (batch.phase === 'analysis') { - phaseText = 'Analyzing...'; + phaseText = analysisTotal > 0 ? `Analyzing ${analysisProcessed}/${analysisTotal}...` : 'Analyzing...'; phaseIcon = ''; } else if (batch.phase === 'downloading') { phaseText = `${batch.completed}/${total} tracks`; @@ -2610,7 +2614,7 @@ function _adlRenderBatchPanel() {