fix(artists): per-artist links on song rails and shared OpenSubsonic refs (#1023)

* fix(artists): per-artist links on song rails and shared OpenSubsonic refs

Song cards in Random Picks and Discover Songs showed joined artist
credits but navigated to a single artistId. Route track surfaces through
resolveTrackArtistRefs and coerce single-object Subsonic JSON payloads.

* docs(changelog): note song-rail multi-artist link fix (PR #1023)
This commit is contained in:
cucadmuh
2026-06-08 00:45:32 +03:00
committed by GitHub
parent 49ad3618a8
commit 30e9db1a2b
16 changed files with 167 additions and 56 deletions
+2 -6
View File
@@ -10,6 +10,7 @@ import { enqueueAndPlay } from '../utils/playback/playSong';
import { useDragDrop } from '../contexts/DragDropContext';
import { useOrbitSongRowBehavior } from '../hooks/useOrbitSongRowBehavior';
import { formatTrackTime } from '../utils/format/formatDuration';
import { resolveTrackArtistRefs } from '../utils/playback/trackArtistRefs';
import { tooltipAttrs } from './tooltipAttrs';
interface Props {
@@ -39,12 +40,7 @@ function SongRow({ song, showBpm }: Props) {
enqueue([songToTrack(song)]);
};
// Split multi-artist tracks into individually clickable links (OpenSubsonic
// `artists[]`), falling back to the single flat artist when absent — mirrors
// the album tracklist so a "A · B" credit isn't one link to a single artist.
const artistRefs = song.artists && song.artists.length > 0
? song.artists
: [{ id: song.artistId, name: song.artist }];
const artistRefs = resolveTrackArtistRefs(song);
const bpmTooltip =
song.localBpmSource === 'analysis'