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
+6 -4
View File
@@ -11,6 +11,7 @@ import { usePlaybackServerId } from '../hooks/usePlaybackServerId';
import { fetchBandsintownEvents, type BandsintownEvent } from '../api/bandsintown';
import CachedImage from './CachedImage';
import OverlayScrollArea from './OverlayScrollArea';
import { primaryTrackArtistRef } from '../utils/playback/trackArtistRefs';
const TOUR_LIMIT = 5;
const BIO_CLAMP_LINES = 4;
@@ -88,8 +89,9 @@ export default function NowPlayingInfo() {
const subsonicServerId = usePlaybackServerId();
const subsonicReady = Boolean(subsonicServerId);
const artistName = currentTrack?.artist || '';
const artistId = currentTrack?.artistId || '';
const primaryArtist = currentTrack ? primaryTrackArtistRef(currentTrack) : null;
const artistName = primaryArtist?.name ?? currentTrack?.artist ?? '';
const artistId = primaryArtist?.id ?? '';
const songId = currentTrack?.id || '';
// Tuple { id, info } gates rendering on "info matches the current artistId" so
@@ -175,8 +177,8 @@ export default function NowPlayingInfo() {
}, [bioClean]);
const contributorRows = useMemo(
() => buildContributorRows(matchedSongDetail, artistName),
[matchedSongDetail, artistName],
() => buildContributorRows(matchedSongDetail, currentTrack?.artist ?? ''),
[matchedSongDetail, currentTrack?.artist],
);
if (!currentTrack) {