From 71aa3397bfcdd7f37c75234c2cb97d60c1683b8e Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Thu, 25 Jun 2026 10:15:00 -0700 Subject: [PATCH] Music automations page: hide video-owned automations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Video-side automations (owned_by='video') live in the shared automation-engine DB and were rendering on the music automations page across branches. Filter them out client-side — the /api/automations endpoint is shared with the video page + auto-sync board, so it can't filter server-side. Pure no-op for anyone without the video side (they have no such rows); auto_sync rows untouched. --- webui/static/stats-automations.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webui/static/stats-automations.js b/webui/static/stats-automations.js index 922e6e0d..f08e2e23 100644 --- a/webui/static/stats-automations.js +++ b/webui/static/stats-automations.js @@ -2611,8 +2611,12 @@ async function loadAutomations() { if (!list || !empty) return; try { const res = await fetch('/api/automations'); - const automations = await res.json(); - if (automations.error) throw new Error(automations.error); + const payload = await res.json(); + if (payload.error) throw new Error(payload.error); + // Hide video-app automations on the MUSIC page: they live in the shared automation + // engine (music_library.db, owned_by='video') but belong to the separate video + // automations page. Pure no-op for anyone without the video side — they have no such rows. + const automations = (Array.isArray(payload) ? payload : []).filter(a => a.owned_by !== 'video'); if (!automations.length) { list.innerHTML = ''; empty.style.display = ''; if (statsBar) statsBar.innerHTML = '';