From 81a8b57dba191bdd3599a4e97a5d2d0b9b65b126 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 25 Jun 2026 00:04:16 +0200 Subject: [PATCH] feat(ui): show download source on quarantine rows (like Completed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quarantine rows now display the download service (HiFi / Soulseek / Tidal …) on a third line, matching the Completed view's source line. Derived from the entry's source_username (a streaming service name passes through; a Soulseek uploader/peer collapses to "Soulseek") and rendered with the same adl-row-batch styling + _adlSourceLabel mapping the Completed rows use. Co-Authored-By: Claude Opus 4.8 --- webui/static/pages-extra.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/webui/static/pages-extra.js b/webui/static/pages-extra.js index 5093600f..572f4639 100644 --- a/webui/static/pages-extra.js +++ b/webui/static/pages-extra.js @@ -2669,9 +2669,21 @@ const _VERIF_QUAR_TRIGGERS = { bit_depth: ['BIT DEPTH FILTER', 'verif-rb-int'], }; +// Streaming sources carry their service name in source_username; a Soulseek +// download carries the uploader's peer name instead — collapse that to +// 'soulseek' so the label matches the Completed view's download-source line. +const _VERIF_QUAR_STREAMING_SOURCES = ['youtube', 'tidal', 'qobuz', 'hifi', 'deezer_dl', 'lidarr', 'soundcloud', 'amazon', 'torrent', 'usenet']; + +function _verifQuarSourceLabel(q) { + const u = String(q.source_username || '').toLowerCase(); + if (_VERIF_QUAR_STREAMING_SOURCES.includes(u)) return _adlSourceLabel(u); + return q.source_username ? _adlSourceLabel('soulseek') : ''; +} + function _verifQuarRowHtml(q, idx, extraAction = '') { const title = _adlEsc(q.expected_track || q.original_filename || q.filename || 'Unknown file'); const meta = [_adlEsc(q.expected_artist || ''), _adlEsc(q.original_filename || '')].filter(Boolean).join(' — '); + const sourceLabel = _verifQuarSourceLabel(q); const [trigLabel, trigClass] = _VERIF_QUAR_TRIGGERS[q.trigger] || ['QUARANTINED', 'verif-rb-unv']; const timeAgo = _verifTimeAgo(q.timestamp); const approveBtn = q.has_full_context @@ -2692,6 +2704,7 @@ function _verifQuarRowHtml(q, idx, extraAction = '') {
${title}
${meta ? `
${meta}
` : ''} + ${sourceLabel ? `
${sourceLabel}
` : ''}
${details || 'No further details in the sidecar.'}