fix(backend): album downloads search by per-track artist, not the album artist

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 <title>" 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>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-07-24 23:42:20 +02:00
1 parent e8b82c177f
commit bdf2867bdd
1 file changed
+5
+5
View File
@@ -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,