fix(now-playing): split artist links and About the Artist tabs (#960)

* fix(now-playing): split artist links and About the Artist tabs

OpenSubsonic artists[] now drives per-artist navigation on Now Playing
hero and the queue current-track row (matching player bar). About the
Artist loads bio for each performer via tabs when a track has multiple
artist ids; queue Info uses the primary ref for bio/tour fetch.

Reported by zunoz on the Psysonic Discord (v1.47.0-rc.3).

* docs: note Now Playing multi-artist fix in CHANGELOG (PR #960)
This commit is contained in:
cucadmuh
2026-06-03 22:16:06 +03:00
committed by GitHub
parent a142bb1dab
commit 4c70408bd6
12 changed files with 379 additions and 48 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { SubsonicOpenArtistRef } from '../../api/subsonicTypes';
import type { Track } from '../../store/playerStoreTypes';
type TrackArtistFields = Pick<Track, 'artist' | 'artistId' | 'artists'>;
/** OpenSubsonic `artists` when present; else legacy `artistId` + `artist` (album track rows). */
export function resolveTrackArtistRefs(track: TrackArtistFields): SubsonicOpenArtistRef[] {
if (track.artists && track.artists.length > 0) {
return track.artists;
}
const id = track.artistId?.trim();
if (id) {
return [{ id, name: track.artist }];
}
return [{ name: track.artist }];
}
/** First performer ref — used for artist bio / discography / top songs on Now Playing. */
export function primaryTrackArtistRef(track: TrackArtistFields): SubsonicOpenArtistRef {
return resolveTrackArtistRefs(track)[0];
}