Fix Subsonic XML Internet Radio response

This commit is contained in:
Deluan 2023-01-15 15:38:38 -05:00
parent 8877b1695a
commit a8478ca74c
3 changed files with 6 additions and 6 deletions

View File

@ -1 +1 @@
{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","internetRadioStations":{"internetRadioStation":[{"id":"12345678","streamUrl":"https://example.com/stream","name":"Example Stream","homePageUrl":"https://example.com"}]}}
{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","internetRadioStations":{"internetRadioStation":[{"id":"12345678","name":"Example Stream","streamUrl":"https://example.com/stream","homePageUrl":"https://example.com"}]}}

View File

@ -1 +1 @@
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0"><internetRadioStations><internetRadioStation><id>12345678</id><streamUrl>https://example.com/stream</streamUrl><name>Example Stream</name><homePageUrl>https://example.com</homePageUrl></internetRadioStation></internetRadioStations></subsonic-response>
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0"><internetRadioStations><internetRadioStation id="12345678" name="Example Stream" streamUrl="https://example.com/stream" homePageUrl="https://example.com"></internetRadioStation></internetRadioStations></subsonic-response>

View File

@ -367,8 +367,8 @@ type InternetRadioStations struct {
}
type Radio struct {
ID string `xml:"id" json:"id"`
StreamUrl string `xml:"streamUrl" json:"streamUrl"`
Name string `xml:"name" json:"name"`
HomepageUrl string `xml:"homePageUrl" json:"homePageUrl"`
ID string `xml:"id,attr" json:"id"`
Name string `xml:"name,attr" json:"name"`
StreamUrl string `xml:"streamUrl,attr" json:"streamUrl"`
HomepageUrl string `xml:"homePageUrl,omitempty,attr" json:"homePageUrl,omitempty"`
}