From 034a19b24faf34deee772ccb02fe1b0ad7dc8b96 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Sat, 27 Jun 2026 16:27:27 -0700 Subject: [PATCH] preview-clip findings: add Play button + length comparison to verify before approving each preview-clip finding now renders a dedicated detail card: File Length vs Real Length (e.g. 28s vs 200s) and a Play button so the user can listen to the clip and confirm it's a busted ~30s preview before approving the delete + re-download. reuses the existing _renderPlayButton/playFindingTrack path that dead_file/orphan findings already use (the finding carries file_path + title/artist/album, everything it needs). --- webui/static/enrichment.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webui/static/enrichment.js b/webui/static/enrichment.js index 4f4813d4..ff33d2a9 100644 --- a/webui/static/enrichment.js +++ b/webui/static/enrichment.js @@ -3195,6 +3195,17 @@ function _renderFindingDetail(f) { tnHtml += _renderPlayButton(f); return tnHtml; + case 'short_preview_track': + if (d.artist) rows.push(['Artist', d.artist]); + if (d.album) rows.push(['Album', d.album]); + if (d.title) rows.push(['Title', d.title]); + if (d.file_duration_s != null) rows.push(['File Length', `${d.file_duration_s}s`, 'warning']); + if (d.expected_duration_s != null) rows.push(['Real Length', `${d.expected_duration_s}s`, 'success']); + if (d.original_path) rows.push(['Path', d.original_path, 'path']); + // Play button lets the user hear the clip and confirm it's a busted ~30s preview + // before approving the delete + re-download. + return media + _gridRows(rows) + _renderPlayButton(f); + default: // Generic: render all detail keys Object.entries(d).forEach(([k, v]) => {