From a6e6af0333f63feb627109888c587e8909224ef4 Mon Sep 17 00:00:00 2001 From: Honey Date: Sat, 23 May 2026 14:13:02 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20use=20parseArtists()=20on=20album=20deta?= =?UTF-8?q?il=20page=20=E2=80=94=20stops=20Au/Ra=20splitting=20on=20/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/views.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/views.js b/src/views.js index 042403b..9fc615e 100644 --- a/src/views.js +++ b/src/views.js @@ -2,7 +2,7 @@ import { S } from './state.js'; import { esc, formatDur, toast } from './utils.js'; import { api, coverUrl, itunesSearch, itunesLookupAlbum, itunesLookupArtistSongs, itunesLookupArtistAlbums, itunesTopCharts, itunesTopSongs } from './api.js'; // Circular imports — safe (only used inside function bodies) -import { playQueue, dlSongLocal, playPreview, toggleStar } from './player.js'; +import { playQueue, dlSongLocal, playPreview, toggleStar, parseArtists } from './player.js'; import { showCtxMenu, openEditPlModal, openDlModal, closeSidebar, switchNavMode } from './ui.js'; import { closeNowPlaying, closeNpMenu } from './nowplaying.js'; import { makeCard, makeAlbumCard, makeSongItem, makeGlobalTrackItem, mkSection } from './components.js'; @@ -624,11 +624,9 @@ export async function loadAlbumDetail(album) { album._fromArtist ? navigate('artist-detail', album._fromArtist) : navigate('albums'); document.getElementById('album-detail-name').textContent = album.name; const artistEl = document.getElementById('album-detail-artist'); - const albumArtistParts = (album.artist || '').split(/\s*(?:\/|•)\s*/).filter(Boolean); - artistEl.innerHTML = albumArtistParts.map((name, i) => { - const aid = i === 0 ? (album.artistId || '') : ''; - return `${esc(name)}`; - }).join(' • ') || ''; + artistEl.innerHTML = parseArtists(album) + .map(a => `${esc(a.name)}`) + .join(' • ') || ''; const cw = document.getElementById('album-cover-wrap'); const cv = coverUrl(album.coverArt, 512); cw.innerHTML = cv ? `` : '
💿
';