From e78ce430196e2be0b8d187786fc0d79d645aaca8 Mon Sep 17 00:00:00 2001 From: Honey Date: Sat, 25 Jul 2026 00:07:40 +0200 Subject: [PATCH] fix(backend): artist download also derives album_artist from iTunes album artist Apply the same collectionArtistName derivation to the per-album loop of the artist download, so a collaboration/soundtrack in an artist's discography is not tagged with the searched artist. Each track still gets its own iTunes artistName; album_artist stays the iTunes album-level artist (consistent, no Navidrome splitting). Co-Authored-By: Claude Opus 4.8 --- backend/novasonic-server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index f2216c4..c3152a5 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -653,7 +653,10 @@ app.post('/api/download', async (req, res) => { for (const alb of artistAlbums) { const tracks = await fetchItunesTracks(alb.collectionId).catch(() => []); if (tracks.length) { - await downloadAlbumTracks({ jobId, artist, albumTitle: alb.collectionName, tracks, artworkUrl: alb.artworkUrl100 }); + // Same as the album path: album_artist from iTunes' album-level artist, so a collaboration + // or soundtrack in the artist's discography isn't tagged with the searched artist. + const albArtist = tracks.map(t => t.collectionArtistName).find(Boolean) || alb.artistName || artist; + await downloadAlbumTracks({ jobId, artist: albArtist, albumTitle: alb.collectionName, tracks, artworkUrl: alb.artworkUrl100 }); } done++; updateJob(jobId, { progress: Math.round((done / artistAlbums.length) * 95) });