From e1cda4eb595a840a2a60f0a123a72f1e2cfc4c1b Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Wed, 15 Apr 2026 20:03:38 -0700 Subject: [PATCH] Fix 'Replace lower quality on import' setting not persisting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The import section appeared twice in the saveSettings object literal — the second key (staging_path only) silently overwrote the first (replace_lower_quality). JavaScript uses last-wins for duplicate keys. Merged into a single import block. --- webui/static/helper.js | 1 + webui/static/script.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/webui/static/helper.js b/webui/static/helper.js index b213ed50..e7f22af7 100644 --- a/webui/static/helper.js +++ b/webui/static/helper.js @@ -3607,6 +3607,7 @@ const WHATS_NEW = { { title: 'Fix Wishlist Button on Non-Dashboard Pages', desc: 'Wishlist button click handler moved to global init so it works from any page, not just the dashboard' }, { title: 'Fix Allow Duplicates Setting Not Saving', desc: 'The "Allow duplicate tracks across albums" toggle was never persisted — it silently reset to ON on every page reload. Now saves correctly' }, { title: 'Fix Wishlist Dropping Cross-Album Tracks', desc: 'Wishlist cleanup was removing same-titled tracks from different albums even when Allow Duplicates was enabled. Cleanup now respects the setting — same song from different albums can coexist in the wishlist' }, + { title: 'Fix "Replace Lower Quality" Setting Not Persisting', desc: 'The import section appeared twice in the settings save payload — the second instance (with only staging_path) overwrote the first (with replace_lower_quality). Merged into a single block' }, // --- April 14, 2026 --- { date: 'April 14, 2026' }, diff --git a/webui/static/script.js b/webui/static/script.js index dfdd2a4a..4bf44b23 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -7286,7 +7286,8 @@ async function saveSettings(quiet = false) { music_videos_path: document.getElementById('music-videos-path').value || './MusicVideos' }, import: { - replace_lower_quality: document.getElementById('import-replace-lower-quality').checked + replace_lower_quality: document.getElementById('import-replace-lower-quality').checked, + staging_path: document.getElementById('staging-path').value || './Staging' }, lossy_copy: { enabled: document.getElementById('lossy-copy-enabled').checked, @@ -7299,9 +7300,6 @@ async function saveSettings(quiet = false) { enabled: document.getElementById('listening-stats-enabled').checked, poll_interval: parseInt(document.getElementById('listening-stats-interval').value) || 30, }, - import: { - staging_path: document.getElementById('staging-path').value || './Staging' - }, m3u_export: { enabled: document.getElementById('m3u-export-enabled').checked, entry_base_path: document.getElementById('m3u-entry-base-path').value || ''