diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index 4bddf8e..b415e8f 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -1341,6 +1341,7 @@ app.post('/api/delete-song', async (req, res) => { return res.status(502).json({ error: `Navidrome lookup failed: ${e.message}` }); } + const ndPath = filePath; // path exactly as Navidrome reported it (for diagnostics) if (!path.isAbsolute(filePath)) filePath = path.join(CONFIG.musicPath, filePath); if (!fs.existsSync(filePath)) { const fileName = path.basename(filePath); @@ -1350,7 +1351,9 @@ app.post('/api/delete-song', async (req, res) => { || _findFileInDir(path.dirname(filePath), fileName) || _findFileByStemOrRomaji(CONFIG.musicPath, titleStem); if (found) filePath = found; - else return res.status(404).json({ error: 'File not found on disk' }); + else return res.status(404).json({ + error: `File not found on disk. Navidrome path: "${ndPath}" — music root: "${CONFIG.musicPath}" — searched for: "${fileName}"`, + }); } // Safety: file must be inside the music root and must be an audio file