Skip to content

🎧 Your Personal Streaming Service

fix(subsonic): ArtistID3 should contain list of AlbumID3

Deluand78c6f6a04df
diff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.go
index 82bf50dc5..d46c7937d 100644
--- a/server/subsonic/browsing.go
+++ b/server/subsonic/browsing.go
@@ -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
}
diff --git a/server/subsonic/filter/filters.go b/server/subsonic/filter/filters.go
index 8a333c8e2..1b5416695 100644
--- a/server/subsonic/filter/filters.go
+++ b/server/subsonic/filter/filters.go
@@ -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{
diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.go
index c0f499ef2..0d22ef50b 100644
--- a/server/subsonic/responses/responses.go
+++ b/server/subsonic/responses/responses.go
@@ -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 {