fix(web): album detail shows the album artist, not the first track's artist
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea98d81146
commit
e8b82c177f
1 file changed
+3
-3
+3
-3
@@ -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])
|
||||
// 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 => `<span class="song-link" onclick="event.stopPropagation();s_goArtist(event,'${esc(a.originalName||a.name)}','${esc(a.id||'')}')">${esc(dispArtistById(a.id, a.name))}</span>`)
|
||||
.join('<span style="color:var(--text3)"> • </span>') || '';
|
||||
}
|
||||
document.getElementById('btn-play-album').onclick = () => playQueue(songs, 0);
|
||||
document.getElementById('btn-dl-album').onclick = () => {
|
||||
songs.forEach((s,i) => setTimeout(() => dlSongLocal(s), i*400));
|
||||
|
||||
Reference in new issue
Block a user