mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-09 23:55:10 -05:00
Artists, not artist
This commit is contained in:
@@ -243,14 +243,22 @@ public class JellyfinResponseBuilder
|
||||
["AlbumId"] = song.AlbumId ?? song.Id,
|
||||
["AlbumArtist"] = song.AlbumArtist ?? song.Artist,
|
||||
["Artists"] = song.Artists.Count > 0 ? song.Artists.ToArray() : new[] { song.Artist },
|
||||
["ArtistItems"] = new[]
|
||||
{
|
||||
new Dictionary<string, object?>
|
||||
["ArtistItems"] = song.Artists.Count > 0
|
||||
? song.Artists.Select((name, index) => new Dictionary<string, object?>
|
||||
{
|
||||
["Id"] = song.ArtistId ?? song.Id,
|
||||
["Name"] = song.Artist
|
||||
}
|
||||
},
|
||||
["Name"] = name,
|
||||
["Id"] = index == 0 && song.ArtistId != null
|
||||
? song.ArtistId
|
||||
: $"{song.Id}-artist-{index}"
|
||||
}).ToArray()
|
||||
: new[]
|
||||
{
|
||||
new Dictionary<string, object?>
|
||||
{
|
||||
["Id"] = song.ArtistId ?? song.Id,
|
||||
["Name"] = song.Artist
|
||||
}
|
||||
},
|
||||
["IndexNumber"] = song.Track,
|
||||
["ParentIndexNumber"] = song.DiscNumber ?? 1,
|
||||
["ProductionYear"] = song.Year,
|
||||
|
||||
Reference in New Issue
Block a user