From 7b4e221881f501b5c33a0a3fb7646240af18653f Mon Sep 17 00:00:00 2001 From: Honey Date: Sat, 23 May 2026 12:54:30 +0200 Subject: [PATCH] fix: use Navidrome's resolved artists array instead of splitting on / Manual split on / broke artist names like HUNTR/X and Au/Ra. Now uses s.artists (OpenSubsonic array with correct IDs per artist) and falls back to s.artist as a single unsplit link. Co-Authored-By: Claude Sonnet 4.6 --- src/components.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components.js b/src/components.js index fbf1f3d..f97bded 100644 --- a/src/components.js +++ b/src/components.js @@ -33,14 +33,14 @@ export function makeSongItem(s, idx, list, { noArtistLink = false, noAlbumLink = el.className = 'song-item' + (S.queue[S.qIdx]?.id === s.id ? ' playing' : ''); el.dataset.songId = s.id; const cv = coverUrl(s.coverArt, 128); - const artistParts = (s.artist || '').split(/\s*(?:\/|•|,)\s*/).filter(Boolean); + const artistParts = Array.isArray(s.artists) && s.artists.length + ? s.artists + : s.artist ? [{ name: s.artist, id: s.artistId || '' }] : []; const artistHtml = artistParts.length - ? artistParts.map((name, i) => { - const aid = i === 0 ? (s.artistId || '') : ''; - return noArtistLink - ? `${esc(name)}` - : `${esc(name)}`; - }).join(' • ') + ? artistParts.map(a => noArtistLink + ? `${esc(a.name)}` + : `${esc(a.name)}` + ).join(' • ') : ''; const albumHtml = !noAlbumLink && (s.albumId||s.album) ? ` · ${esc(s.album||'')}`