From c4c112d17e85b0c4880f6db2f3743943882ec210 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Thu, 18 Jun 2026 15:39:41 -0700 Subject: [PATCH] #889 Phase 5: wire the Re-identify button into the Enhanced library view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a per-track ⇄ action (admin-only, alongside source-info/redownload/delete) that opens the Re-identify modal seeded with the track's title/artist/album/art. The loop is now live: click ⇄ → pick a release → file stages + hint writes → auto-import re-files it under the chosen single/EP/album (and replaces the old entry on success when 'replace' is ticked). Double-gated: the button only renders for admins, and /api/reidentify/apply re-checks is_admin server-side. --- webui/static/library.js | 10 ++++++++++ webui/static/style.css | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/webui/static/library.js b/webui/static/library.js index eda689e2..c654d211 100644 --- a/webui/static/library.js +++ b/webui/static/library.js @@ -4190,6 +4190,7 @@ function _buildTrackRow(track, album, admin) { actionsTd.innerHTML = `
+
@@ -4387,6 +4388,15 @@ function _attachTableDelegation(table, album) { return; } + // Re-identify button (admin) — #889 + if (target.closest('.enhanced-reidentify-btn')) { + e.stopPropagation(); + const artistName = artistDetailPageState.enhancedData ? artistDetailPageState.enhancedData.artist.name : ''; + openReidentifyModal(track.id, track.title || 'Unknown', artistName, + album.title || '', album.thumb_url || ''); + return; + } + // Redownload button (admin) if (target.closest('.enhanced-redownload-btn')) { e.stopPropagation(); diff --git a/webui/static/style.css b/webui/static/style.css index 1911cd83..d021b9d2 100644 --- a/webui/static/style.css +++ b/webui/static/style.css @@ -59621,6 +59621,7 @@ tr:hover .enhanced-track-actions-group { opacity: 1; } .enhanced-track-actions-group.visible { opacity: 1; } .enhanced-source-info-btn, +.enhanced-reidentify-btn, .enhanced-redownload-btn { background: none; border: none; cursor: pointer; width: 24px; height: 24px; border-radius: 5px; @@ -59631,6 +59632,9 @@ tr:hover .enhanced-track-actions-group { opacity: 1; } .enhanced-source-info-btn { color: rgba(255,255,255,0.35); font-size: 13px; } .enhanced-source-info-btn:hover { color: rgba(100,181,246,0.9); background: rgba(100,181,246,0.1); } +.enhanced-reidentify-btn { color: rgba(255,255,255,0.35); font-size: 15px; } +.enhanced-reidentify-btn:hover { color: rgb(var(--accent-light-rgb)); background: rgba(var(--accent-rgb),0.1); } + .enhanced-redownload-btn { color: rgba(255,255,255,0.35); font-size: 15px; } .enhanced-redownload-btn:hover { color: var(--accent); background: rgba(var(--accent-rgb),0.1); }