fix(subsonic): ArtistID3 should contain list of AlbumID3

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2025-03-20 22:10:42 -04:00
parent 59ece40393
commit d78c6f6a04
3 changed files with 4 additions and 4 deletions

View file

@ -424,7 +424,7 @@ func (api *Router) buildArtist(r *http.Request, artist *model.Artist) (*response
return nil, err
}
a.Album = slice.MapWithArg(albums, ctx, childFromAlbum)
a.Album = slice.MapWithArg(albums, ctx, buildAlbumID3)
return a, nil
}

View file

@ -48,11 +48,11 @@ func AlbumsByArtist() Options {
func AlbumsByArtistID(artistId string) Options {
filters := []Sqlizer{
persistence.Exists("json_tree(Participants, '$.albumartist')", Eq{"value": artistId}),
persistence.Exists("json_tree(participants, '$.albumartist')", Eq{"value": artistId}),
}
if conf.Server.Subsonic.ArtistParticipations {
filters = append(filters,
persistence.Exists("json_tree(Participants, '$.artist')", Eq{"value": artistId}),
persistence.Exists("json_tree(participants, '$.artist')", Eq{"value": artistId}),
)
}
return addDefaultFilters(Options{

View file

@ -284,7 +284,7 @@ type OpenSubsonicAlbumID3 struct {
type ArtistWithAlbumsID3 struct {
ArtistID3
Album []Child `xml:"album" json:"album,omitempty"`
Album []AlbumID3 `xml:"album" json:"album,omitempty"`
}
type AlbumWithSongsID3 struct {