fix(ui): split album and track artists (OpenSubsonic) (#696)

* fix(ui): split OpenSubsonic album and track artists in header and player

Album detail header uses albumArtists from album or child songs; player bar,
mobile player, and mini player use structured track artists with per-id links.
Adds deriveAlbumHeaderArtistRefs helper and OpenArtistRefInline.

Fixes #552

* docs: changelog and credits for OpenSubsonic artist links (PR #696)
This commit is contained in:
cucadmuh
2026-05-14 21:56:39 +03:00
committed by GitHub
parent ecdbe0cf2a
commit 3cc172723d
20 changed files with 315 additions and 29 deletions
+9
View File
@@ -85,6 +85,14 @@ describe('songToTrack', () => {
expect(t.replayGainPeak).toBeUndefined();
});
it('copies OpenSubsonic artists when present', () => {
const song = makeSubsonicSong({
artists: [{ id: 'a1', name: 'Feat' }, { id: 'a2', name: 'Main' }],
});
const t = songToTrack(song);
expect(t.artists).toEqual(song.artists);
});
it('does not invent fields that the Subsonic song lacks', () => {
const song = makeSubsonicSong({});
const t = songToTrack(song);
@@ -92,5 +100,6 @@ describe('songToTrack', () => {
expect(t.autoAdded).toBeUndefined();
expect(t.radioAdded).toBeUndefined();
expect(t.playNextAdded).toBeUndefined();
expect(t.artists).toBeUndefined();
});
});
+1
View File
@@ -8,6 +8,7 @@ export function songToTrack(song: SubsonicSong): Track {
album: song.album,
albumId: song.albumId,
artistId: song.artistId,
artists: song.artists && song.artists.length > 0 ? song.artists : undefined,
duration: song.duration,
coverArt: song.coverArt,
track: song.track,