diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index a938d63..338d4ac 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -228,17 +228,20 @@ async function downloadTrack({ jobId, artist, albumArtist, title, album, year, t fs.readdirSync(dir).filter(f => AUDIO_EXTS.some(e => f.endsWith(`.${e}`))).length; // Step 1: YouTube Music — music-specific index, far fewer false positives - log(jobId, `🎵 YouTube Music: "${query}"`); + // Falls silently if this yt-dlp version doesn't support ytmsearch (older Alpine package) const countBefore = audioFileCount(); try { + log(jobId, `🎵 YouTube Music: "${query}"`); await runYtdlp(`ytmsearch:${query}`); } catch (e) { - log(jobId, `⚠️ YouTube Music Fehler: ${e.message}`); + if (!e.message.includes('Unsupported url scheme')) { + log(jobId, `⚠️ YouTube Music Fehler: ${e.message}`); + } } // Step 2: Fallback to regular YouTube if no file was produced if (audioFileCount() === countBefore) { - log(jobId, `🔄 Fallback: YouTube (5 Ergebnisse) — "${query}"`); + log(jobId, `🔍 YouTube: "${query}"`); await runYtdlp(`ytsearch5:${query}`); }