From bdf2867bdd505eebcf10d33b462197a259998882 Mon Sep 17 00:00:00 2001 From: Honey Date: Fri, 24 Jul 2026 23:42:20 +0200 Subject: [PATCH] fix(backend): album downloads search by per-track artist, not the album artist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit downloadAlbumTracks passed each track's artistName as `artist` but no `rawArtist`, so in ytdlp.js the YTM/YouTube search query and the channel filter used `mainArtist = albumArtist || artist` — always the album-artist blob. On mixed-artist soundtracks that matched nothing: e.g. TWICE's "Strategy" and MeloMance's "Love, Maybe" were searched as "KPop Demon Hunters Cast, HUNTR/X & Saja Boys " with `channel ~= KPop`, and failed with "Nicht eindeutig gefunden". Pass rawArtist = track.artistName so the search + channel filter use the actual performer ("TWICE Strategy", channel ~= TWICE). The album_artist tag still comes from `albumArtist`, so album grouping is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --- backend/lib/downloader.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/lib/downloader.js b/backend/lib/downloader.js index af58761..39483e3 100644 --- a/backend/lib/downloader.js +++ b/backend/lib/downloader.js @@ -18,6 +18,11 @@ async function downloadAlbumTracks({ jobId, artist, albumTitle, tracks, artworkU const result = await downloadTrack({ jobId, artist: track.artistName || artist, + // Drive the YTM/YouTube search + channel filter with THIS track's own artist, not the album + // artist. On mixed-artist soundtracks/compilations (e.g. "Strategy" is TWICE, "Love, Maybe" + // is MeloMance) the album-artist blob + its channel filter matches nothing. album_artist tag + // still uses `albumArtist` below, so album grouping is unaffected. + rawArtist: track.artistName || artist, albumArtist: artist, title: track.trackName || track.title, album: albumTitle,