diff --git a/web/app.js b/web/app.js index 652b65a..7256bd9 100644 --- a/web/app.js +++ b/web/app.js @@ -131,6 +131,7 @@ let liveListenWS = null; // WebSocket-based live listen let liveListenTarget = null; // { freq, bw, mode } let stats = { buffer_samples: 0, dropped: 0, resets: 0, last_sample_ago_ms: -1 }; let refinementInfo = {}; +let decisionIndex = new Map(); // --------------------------------------------------------------------------- // LiveListenWS — WebSocket-based gapless audio streaming via /ws/audio @@ -754,6 +755,11 @@ async function loadRefinement() { const res = await fetch('/api/refinement'); if (!res.ok) return; refinementInfo = await res.json(); + decisionIndex = new Map(); + const items = Array.isArray(refinementInfo.decision_items) ? refinementInfo.decision_items : []; + items.forEach(item => { + if (item && item.id != null) decisionIndex.set(String(item.id), item); + }); } catch {} } @@ -1341,7 +1347,11 @@ function _createSignalItem(s) { const mod = s.class?.mod_type || ''; const mc = modColor(mod); const rds = s.class?.pll?.rds_station || ''; - btn.innerHTML = `