From e8b82c177fab8e1b9705a28d8b631d333f3cc247 Mon Sep 17 00:00:00 2001 From: Honey Date: Fri, 24 Jul 2026 23:28:39 +0200 Subject: [PATCH] fix(web): album detail shows the album artist, not the first track's artist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loadAlbumDetail overwrote the header artist with parseArtists(songs[0]) — the first track's artist. On soundtracks/compilations that is wrong (e.g. "KPop Demon Hunters" showed "TWICE" from track 1 "TAKEDOWN"). Use r.album (the getAlbum response, which carries the album's own album-artist tags in .artists / .artist) so it matches the Android app: "KPop Demon Hunters Cast • HUNTR/X • Saja Boys". Co-Authored-By: Claude Opus 4.8 --- src/views/detail.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/detail.js b/src/views/detail.js index dbed21c..2a52b73 100644 --- a/src/views/detail.js +++ b/src/views/detail.js @@ -467,11 +467,11 @@ export async function loadAlbumDetail(album) { document.getElementById('album-detail-stats').textContent = `${songs.length} Titel · ${r.album.year||''} · ${totalMin} Min.`; // r.album has sortName (album sort tag) — use it; nav album may not have sortName document.getElementById('album-detail-name').textContent = dispAlbumName(r.album); - if (songs[0]) { - artistEl.innerHTML = parseArtists(songs[0]) - .map(a => `${esc(dispArtistById(a.id, a.name))}`) - .join(' • ') || ''; - } + // Album artist comes from the album's own album-artist tags (r.album.artists / .artist), NOT the + // first track — for soundtracks/compilations track 1's artist (e.g. TWICE) is not the album artist. + artistEl.innerHTML = parseArtists(r.album) + .map(a => `${esc(dispArtistById(a.id, a.name))}`) + .join(' • ') || ''; document.getElementById('btn-play-album').onclick = () => playQueue(songs, 0); document.getElementById('btn-dl-album').onclick = () => { songs.forEach((s,i) => setTimeout(() => dlSongLocal(s), i*400));