🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Fix Subsonic XML Internet Radio response
Deluana8478ca74c31
diff --git a/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .JSON b/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .JSONindex be2147775..8b6371e01 100644--- a/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .JSON+++ b/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .JSON@@ -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"}]}}diff --git a/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .XML b/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .XMLindex e86f63223..e89e11e38 100644--- a/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .XML+++ b/server/subsonic/responses/.snapshots/Responses InternetRadioStations with data should match .XML@@ -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>diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.goindex 0e1c4d570..7956b0419 100644--- a/server/subsonic/responses/responses.go+++ b/server/subsonic/responses/responses.go@@ -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"`}