From c34123af38f27567c488ee23eb90d902c7dbbd10 Mon Sep 17 00:00:00 2001 From: Honey Date: Fri, 19 Jun 2026 10:48:26 +0200 Subject: [PATCH] fix(backend): apply web_music client to YTM search extraction too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The YTM search (getYtmVideoUrls) ran without the web_music client, so yt-dlp parsed the search page as a generic YouTube search and returned unrelated videos instead of the native Songs shelf — the actual artist track (e.g. qNffDItRUeo for MINA - recognize) never appeared in results. Apply the same player_client=web_music,default arg to the search step. Co-Authored-By: Claude Opus 4.8 --- backend/lib/ytdlp.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/lib/ytdlp.js b/backend/lib/ytdlp.js index 35a8200..41676b9 100644 --- a/backend/lib/ytdlp.js +++ b/backend/lib/ytdlp.js @@ -220,6 +220,10 @@ async function downloadTrack({ jobId, artist, rawArtist, albumArtist, title, alb '--playlist-items', `1-${maxItems}`, '--print', 'webpage_url', '--no-warnings', + // Without the web_music client, yt-dlp parses the YTM search page as a + // generic YouTube search and returns unrelated videos instead of the + // native Songs shelf (where the actual artist track lives). + '--extractor-args', 'youtube:player_client=web_music,default', ], { env: { ...process.env, PYTHONUNBUFFERED: '1' } }); proc.stdout.on('data', d => { const text = d.toString();