Artists, not artist

This commit is contained in:
2026-02-02 15:57:34 -05:00
parent 91275a2835
commit d0f26c0182

View File

@@ -243,7 +243,15 @@ public class JellyfinResponseBuilder
["AlbumId"] = song.AlbumId ?? song.Id, ["AlbumId"] = song.AlbumId ?? song.Id,
["AlbumArtist"] = song.AlbumArtist ?? song.Artist, ["AlbumArtist"] = song.AlbumArtist ?? song.Artist,
["Artists"] = song.Artists.Count > 0 ? song.Artists.ToArray() : new[] { song.Artist }, ["Artists"] = song.Artists.Count > 0 ? song.Artists.ToArray() : new[] { song.Artist },
["ArtistItems"] = new[] ["ArtistItems"] = song.Artists.Count > 0
? song.Artists.Select((name, index) => new Dictionary<string, object?>
{
["Name"] = name,
["Id"] = index == 0 && song.ArtistId != null
? song.ArtistId
: $"{song.Id}-artist-{index}"
}).ToArray()
: new[]
{ {
new Dictionary<string, object?> new Dictionary<string, object?>
{ {