Fix getOpenSubsonicExtensions endpoint

Match the current doc: https://opensubsonic.netlify.app/docs/endpoints/getopensubsonicextensions/

openSubsonicExtensions must be an array, not a struct
This commit is contained in:
Deluan
2023-11-27 13:25:06 -05:00
parent 60a5fbe1fe
commit f543e7accc
6 changed files with 68 additions and 2 deletions
+7 -2
View File
@@ -424,13 +424,18 @@ type JukeboxPlaylist struct {
JukeboxStatus
Entry []Child `xml:"entry,omitempty" json:"entry,omitempty"`
}
type OpenSubsonicExtensions struct{}
type OpenSubsonicExtension struct {
Name string `xml:"name,attr" json:"name"`
Versions []int32 `xml:"versions" json:"versions"`
}
type OpenSubsonicExtensions []OpenSubsonicExtension
// OpenSubsonic response type for multi-valued genres list
type ItemGenre struct {
Name string `xml:"name,attr" json:"name"`
}
// ItemGenres holds a list of genres (OpenSubsonic). If it is null, it must be marshalled as an empty array.
type ItemGenres []ItemGenre
func (i ItemGenres) MarshalJSON() ([]byte, error) {