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 <noreply@anthropic.com>
This commit is contained in:
1 parent
48a13fbccb
commit
e78ce43019
1 file changed
+4
-1
@@ -653,7 +653,10 @@ app.post('/api/download', async (req, res) => {
|
|||||||
for (const alb of artistAlbums) {
|
for (const alb of artistAlbums) {
|
||||||
const tracks = await fetchItunesTracks(alb.collectionId).catch(() => []);
|
const tracks = await fetchItunesTracks(alb.collectionId).catch(() => []);
|
||||||
if (tracks.length) {
|
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++;
|
done++;
|
||||||
updateJob(jobId, { progress: Math.round((done / artistAlbums.length) * 95) });
|
updateJob(jobId, { progress: Math.round((done / artistAlbums.length) * 95) });
|
||||||
|
|||||||
Reference in new issue
Block a user