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
@@ -1,6 +1,7 @@
import React from 'react';
import React, { useMemo } from 'react';
import { useNavigate } from 'react-router-dom';
import type { SubsonicSong } from '../../api/subsonicTypes';
import { resolveTrackArtistRefs } from '../../utils/playback/trackArtistRefs';
/**
* Multi-artist credit for playlist track rows (main list + suggestions).
@@ -11,9 +12,7 @@ import type { SubsonicSong } from '../../api/subsonicTypes';
*/
export function PlaylistArtistCell({ song }: { song: SubsonicSong }) {
const navigate = useNavigate();
const artistRefs = song.artists && song.artists.length > 0
? song.artists
: [{ id: song.artistId, name: song.artist }];
const artistRefs = useMemo(() => resolveTrackArtistRefs(song), [song]);
return (
<div className="track-artist-cell">
{artistRefs.map((a, i) => (