From a4d6e78bce7cb9dd75b60cde3ad4110d0486f933 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Mon, 15 Jun 2026 14:42:36 -0700 Subject: [PATCH] fix: video side can no longer change the music server via the shared settings page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The settings page is shared; on the video side its auto-save (debouncedAutoSave- Settings) still fired when editing VIDEO fields (TMDB key, watch region, autoplay), and saveSettings reads the server toggle from the DOM + persists active_media_ server — so clicking the toggle to Jellyfin on the video side and then editing any field would write active_media_server=jellyfin to the shared config (and trigger a full music save). Guard: never auto-save music settings while data-side=video. Video settings persist via /api/video/*; the toggle re-syncs to the real active server on every Settings load. One-way isolation restored. --- webui/static/settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webui/static/settings.js b/webui/static/settings.js index 1921839b..d7503ca0 100644 --- a/webui/static/settings.js +++ b/webui/static/settings.js @@ -45,6 +45,12 @@ function debouncedAutoSaveSettings() { // fields on load — those aren't user edits and must not trigger a full // save (which re-initializes every backend service client). if (window._suppressSettingsAutoSave) return; + // ISOLATION: the video side reuses this shared settings page, so editing a + // VIDEO field (TMDB key, region, autoplay…) would otherwise fire this MUSIC + // auto-save — which reads the server toggle from the DOM and would persist + // active_media_server, letting the video side change the music server. Video + // settings save themselves via /api/video/*; never auto-save music here. + if (document.body.getAttribute('data-side') === 'video') return; // #827: the Logs tab has no savable settings — its live-viewer controls // (source picker, filters, auto-scroll) were tripping the auto-save and // flooding app.log with "Settings saved" lines, drowning out the logs the