From 7070b98756b37530493ca770655e8918f32436f8 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:47:25 -0700 Subject: [PATCH] Fix reorganize modal using hardcoded template instead of saved settings The enhanced view reorganize modal had a hardcoded default path template instead of loading the user's saved template from settings. Now fetches the saved album_path template from /api/settings on modal open. --- webui/static/script.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/webui/static/script.js b/webui/static/script.js index 31c79afc..85131682 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -42435,8 +42435,17 @@ async function showReorganizeModal(albumId) { html += '
'; html += ''; html += '
Use / to separate folders. The last segment becomes the filename.
'; + // Load saved template from settings, fall back to default + let savedTemplate = '$albumartist/$albumartist - $album/$track - $title'; + try { + const settingsResp = await fetch('/api/settings'); + if (settingsResp.ok) { + const settings = await settingsResp.json(); + savedTemplate = settings.file_organization?.templates?.album_path || savedTemplate; + } + } catch (_) {} html += '