From a68230fadc7ecbb61dacccb139108b41c7fd0232 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Fri, 16 Jan 2026 10:07:05 -0600 Subject: [PATCH] Make scrobbling options mutually exclusive in offline settings Immediate and Accumulated scrobbling cannot be enabled at the same time, but both can be disabled. When one is turned on, the other is automatically turned off. --- src/lib/components/views/SettingsView.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/components/views/SettingsView.svelte b/src/lib/components/views/SettingsView.svelte index 9a585a57e..81cf86040 100644 --- a/src/lib/components/views/SettingsView.svelte +++ b/src/lib/components/views/SettingsView.svelte @@ -710,6 +710,10 @@ async function handleAllowImmediateScrobblingChange(enabled: boolean) { try { await setAllowImmediateScrobbling(enabled); + // Mutually exclusive: if turning on, turn off the other + if (enabled && offlineSettings.allowAccumulatedScrobbling) { + await setAllowAccumulatedScrobbling(false); + } } catch (error) { console.error('Failed to set allow immediate scrobbling:', error); } @@ -718,6 +722,10 @@ async function handleAllowAccumulatedScrobblingChange(enabled: boolean) { try { await setAllowAccumulatedScrobbling(enabled); + // Mutually exclusive: if turning on, turn off the other + if (enabled && offlineSettings.allowImmediateScrobbling) { + await setAllowImmediateScrobbling(false); + } } catch (error) { console.error('Failed to set allow accumulated scrobbling:', error); }