From 2923757029728a4aca1d813596e44e88e7413d6e Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:36:50 -0500 Subject: [PATCH] fix(settings): organize downloads tab --- index.html | 86 ++++++++++++++++++++++++++------------------------ js/settings.js | 24 ++++++++++++-- 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/index.html b/index.html index e6fde5e..4aba91b 100644 --- a/index.html +++ b/index.html @@ -4075,6 +4075,49 @@
+
+
+
+
+ Download Quality + Quality for track downloads +
+ +
+ +
+
+
+ Dolby Atmos + Prefer Dolby Atmos tracks when available +
+ +
+
+
+ Lossless Container + Container format for lossless downloads +
+ +
+
@@ -4135,6 +4178,8 @@
+
+
Download Lyrics @@ -4159,47 +4204,6 @@
-
-
-
- Download Quality - Quality for track downloads -
- -
- -
-
-
- Dolby Atmos - Prefer Dolby Atmos tracks when available -
- -
-
-
- Lossless Container - Container format for lossless downloads -
- -
Cover Art Size diff --git a/js/settings.js b/js/settings.js index 6519098..3b80f91 100644 --- a/js/settings.js +++ b/js/settings.js @@ -1004,7 +1004,7 @@ export async function initializeSettings(scrobbler, player, api, ui) { if (resetSavedFolderSetting) { let showReset = false; if (isFolderMethod && hasFolderPicker && modernSettings.rememberBulkDownloadFolder) { - const savedHandle = await db.getSetting('bulk_download_folder_handle'); + const savedHandle = modernSettings.bulkDownloadFolder; showReset = !!savedHandle; } resetSavedFolderSetting.style.display = showReset ? '' : 'none'; @@ -1102,7 +1102,8 @@ export async function initializeSettings(scrobbler, player, api, ui) { if (resetSavedFolderBtn) { resetSavedFolderBtn.addEventListener('click', async () => { - await db.saveSetting('bulk_download_folder_handle', null); + modernSettings.bulkDownloadFolder = null; + await modernSettings.waitPending(); await updateFolderMethodVisibility(); }); } @@ -1122,7 +1123,7 @@ export async function initializeSettings(scrobbler, player, api, ui) { } updateForceZipBlobVisibility(); - updateFolderMethodVisibility(); + await updateFolderMethodVisibility(); const includeCoverToggle = document.getElementById('include-cover-toggle'); if (includeCoverToggle) { @@ -2619,6 +2620,23 @@ export async function initializeSettings(scrobbler, player, api, ui) { observer.observe(appearanceTabContent, { attributes: true }); } + // Watch for downloads tab becoming active and update setting visibility + const downloadsTabContent = document.getElementById('settings-tab-downloads'); + if (downloadsTabContent) { + const observer = new MutationObserver(async (mutations) => { + for (const mutation of mutations) { + if (mutation.type === 'attributes' && mutation.attributeName === 'class') { + if (downloadsTabContent.classList.contains('active')) { + console.log('[Settings] Downloads tab became active, updating setting visibility'); + updateForceZipBlobVisibility(); + await updateFolderMethodVisibility(); + } + } + } + }); + observer.observe(downloadsTabContent, { attributes: true }); + } + // Visualizer Mode Select const visualizerModeSelect = document.getElementById('visualizer-mode-select'); if (visualizerModeSelect) {