Fix MUSIC_PATH direct mount + backend URL prefill

- MUSIC_PATH is now used 1:1 inside the container (no /music remapping)
- config.js 404-safe with inline fallback defaults
- Prefill uses .trim() so empty strings don't overwrite fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-25 17:37:30 +02:00
1 parent 56c5662a11
commit 6e00b78219
5 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -111,8 +111,8 @@ window.addEventListener('load',()=>{
const saved=localStorage.getItem('ns_cfg');
if(saved){cfg=JSON.parse(saved);startApp()}
// Autofill URLs from Docker env (set via config.js)
if(window.NS_SERVER_URL){const el=document.getElementById('srv-url');if(el&&!el.value)el.value=window.NS_SERVER_URL;}
if(window.NS_BACKEND_URL){const el=document.getElementById('backend-url');if(el&&!el.value)el.value=window.NS_BACKEND_URL;}
if(window.NS_SERVER_URL?.trim()){const el=document.getElementById('srv-url');if(el&&!el.value)el.value=window.NS_SERVER_URL.trim();}
if(window.NS_BACKEND_URL?.trim()){const el=document.getElementById('backend-url');if(el&&!el.value)el.value=window.NS_BACKEND_URL.trim();}
document.getElementById('srv-pass').addEventListener('keydown',e=>{if(e.key==='Enter')doConnect()});
audio.addEventListener('timeupdate',updateProgress);
audio.addEventListener('ended',onEnded);