From 9154e44eb472de394e33a69adc4abfe1614e2461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deluan=20Quint=C3=A3o?= Date: Sat, 8 Apr 2023 13:25:37 -0400 Subject: [PATCH] Add initial support for OpenSubsonic. (#2302) --- server/subsonic/api.go | 3 +++ server/subsonic/helpers.go | 8 +++++++- server/subsonic/opensubsonic.go | 13 +++++++++++++ ...Responses AlbumInfo with data should match .JSON | 2 +- .../Responses AlbumInfo with data should match .XML | 2 +- ...ponses AlbumInfo without data should match .JSON | 2 +- ...sponses AlbumInfo without data should match .XML | 2 +- ...Responses AlbumList with data should match .JSON | 2 +- .../Responses AlbumList with data should match .XML | 2 +- ...ponses AlbumList without data should match .JSON | 2 +- ...sponses AlbumList without data should match .XML | 2 +- ...esponses ArtistInfo with data should match .JSON | 2 +- ...Responses ArtistInfo with data should match .XML | 2 +- ...onses ArtistInfo without data should match .JSON | 2 +- ...ponses ArtistInfo without data should match .XML | 2 +- ...Responses Bookmarks with data should match .JSON | 2 +- .../Responses Bookmarks with data should match .XML | 2 +- ...ponses Bookmarks without data should match .JSON | 2 +- ...sponses Bookmarks without data should match .XML | 2 +- .../Responses Child with data should match .JSON | 2 +- .../Responses Child with data should match .XML | 2 +- ...Responses Directory with data should match .JSON | 2 +- .../Responses Directory with data should match .XML | 2 +- ...ponses Directory without data should match .JSON | 2 +- ...sponses Directory without data should match .XML | 2 +- .../Responses EmptyResponse should match .JSON | 2 +- .../Responses EmptyResponse should match .XML | 2 +- .../Responses Genres with data should match .JSON | 2 +- .../Responses Genres with data should match .XML | 2 +- ...Responses Genres without data should match .JSON | 2 +- .../Responses Genres without data should match .XML | 2 +- .../Responses Indexes with data should match .JSON | 2 +- .../Responses Indexes with data should match .XML | 2 +- ...esponses Indexes without data should match .JSON | 2 +- ...Responses Indexes without data should match .XML | 2 +- ...ternetRadioStations with data should match .JSON | 2 +- ...nternetRadioStations with data should match .XML | 2 +- ...netRadioStations without data should match .JSON | 2 +- ...rnetRadioStations without data should match .XML | 2 +- .../.snapshots/Responses License should match .JSON | 2 +- .../.snapshots/Responses License should match .XML | 2 +- .../Responses Lyrics with data should match .JSON | 2 +- .../Responses Lyrics with data should match .XML | 2 +- ...Responses Lyrics without data should match .JSON | 2 +- .../Responses Lyrics without data should match .XML | 2 +- ...ponses MusicFolders with data should match .JSON | 2 +- ...sponses MusicFolders with data should match .XML | 2 +- ...ses MusicFolders without data should match .JSON | 2 +- ...nses MusicFolders without data should match .XML | 2 +- ...Responses PlayQueue with data should match .JSON | 2 +- .../Responses PlayQueue with data should match .XML | 2 +- ...ponses PlayQueue without data should match .JSON | 2 +- ...sponses PlayQueue without data should match .XML | 2 +- ...Responses Playlists with data should match .JSON | 2 +- .../Responses Playlists with data should match .XML | 2 +- ...ponses Playlists without data should match .JSON | 2 +- ...sponses Playlists without data should match .XML | 2 +- ...esponses ScanStatus with data should match .JSON | 2 +- ...Responses ScanStatus with data should match .XML | 2 +- ...onses ScanStatus without data should match .JSON | 2 +- ...ponses ScanStatus without data should match .XML | 2 +- .../Responses Shares with data should match .JSON | 2 +- .../Responses Shares with data should match .XML | 2 +- ...Responses Shares without data should match .JSON | 2 +- .../Responses Shares without data should match .XML | 2 +- ...ponses SimilarSongs with data should match .JSON | 2 +- ...sponses SimilarSongs with data should match .XML | 2 +- ...ses SimilarSongs without data should match .JSON | 2 +- ...nses SimilarSongs without data should match .XML | 2 +- ...onses SimilarSongs2 with data should match .JSON | 2 +- ...ponses SimilarSongs2 with data should match .XML | 2 +- ...es SimilarSongs2 without data should match .JSON | 2 +- ...ses SimilarSongs2 without data should match .XML | 2 +- .../Responses TopSongs with data should match .JSON | 2 +- .../Responses TopSongs with data should match .XML | 2 +- ...sponses TopSongs without data should match .JSON | 2 +- ...esponses TopSongs without data should match .XML | 2 +- .../Responses User with data should match .JSON | 2 +- .../Responses User with data should match .XML | 2 +- .../Responses User without data should match .JSON | 2 +- .../Responses User without data should match .XML | 2 +- .../Responses Users with data should match .JSON | 2 +- .../Responses Users with data should match .XML | 2 +- .../Responses Users without data should match .JSON | 2 +- .../Responses Users without data should match .XML | 2 +- server/subsonic/responses/responses.go | 6 +++++- server/subsonic/responses/responses_test.go | 8 +++++++- 87 files changed, 117 insertions(+), 85 deletions(-) create mode 100644 server/subsonic/opensubsonic.go diff --git a/server/subsonic/api.go b/server/subsonic/api.go index 8d65faa83..bdad5e2d6 100644 --- a/server/subsonic/api.go +++ b/server/subsonic/api.go @@ -175,6 +175,9 @@ func (api *Router) routes() http.Handler { } else { h501(r, "getShares", "createShare", "updateShare", "deleteShare") } + r.Group(func(r chi.Router) { + h(r, "getOpenSubsonicExtensions", api.GetOpenSubsonicExtensions) + }) // Not Implemented (yet?) h501(r, "jukeboxControl") diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.go index d460e53f8..f7b13d10a 100644 --- a/server/subsonic/helpers.go +++ b/server/subsonic/helpers.go @@ -16,7 +16,13 @@ import ( ) func newResponse() *responses.Subsonic { - return &responses.Subsonic{Status: "ok", Version: Version, Type: consts.AppName, ServerVersion: consts.Version} + return &responses.Subsonic{ + Status: "ok", + Version: Version, + Type: consts.AppName, + ServerVersion: consts.Version, + OpenSubsonic: true, + } } func requiredParamString(r *http.Request, param string) (string, error) { diff --git a/server/subsonic/opensubsonic.go b/server/subsonic/opensubsonic.go new file mode 100644 index 000000000..106029daf --- /dev/null +++ b/server/subsonic/opensubsonic.go @@ -0,0 +1,13 @@ +package subsonic + +import ( + "net/http" + + "github.com/navidrome/navidrome/server/subsonic/responses" +) + +func (api *Router) GetOpenSubsonicExtensions(_ *http.Request) (*responses.Subsonic, error) { + response := newResponse() + response.OpenSubsonicExtensions = &responses.OpenSubsonicExtensions{} + return response, nil +} diff --git a/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .JSON index 309196637..bd0907693 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","albumInfo":{"notes":"Believe is the twenty-third studio album by American singer-actress Cher...","musicBrainzId":"03c91c40-49a6-44a7-90e7-a700edf97a62","lastFmUrl":"https://www.last.fm/music/Cher/Believe","smallImageUrl":"https://lastfm.freetls.fastly.net/i/u/34s/3b54885952161aaea4ce2965b2db1638.png","mediumImageUrl":"https://lastfm.freetls.fastly.net/i/u/64s/3b54885952161aaea4ce2965b2db1638.png","largeImageUrl":"https://lastfm.freetls.fastly.net/i/u/174s/3b54885952161aaea4ce2965b2db1638.png"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"albumInfo":{"notes":"Believe is the twenty-third studio album by American singer-actress Cher...","musicBrainzId":"03c91c40-49a6-44a7-90e7-a700edf97a62","lastFmUrl":"https://www.last.fm/music/Cher/Believe","smallImageUrl":"https://lastfm.freetls.fastly.net/i/u/34s/3b54885952161aaea4ce2965b2db1638.png","mediumImageUrl":"https://lastfm.freetls.fastly.net/i/u/64s/3b54885952161aaea4ce2965b2db1638.png","largeImageUrl":"https://lastfm.freetls.fastly.net/i/u/174s/3b54885952161aaea4ce2965b2db1638.png"}} diff --git a/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .XML index a2f861479..4a1015d82 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses AlbumInfo with data should match .XML @@ -1 +1 @@ -Believe is the twenty-third studio album by American singer-actress Cher...03c91c40-49a6-44a7-90e7-a700edf97a62https://www.last.fm/music/Cher/Believehttps://lastfm.freetls.fastly.net/i/u/34s/3b54885952161aaea4ce2965b2db1638.pnghttps://lastfm.freetls.fastly.net/i/u/64s/3b54885952161aaea4ce2965b2db1638.pnghttps://lastfm.freetls.fastly.net/i/u/174s/3b54885952161aaea4ce2965b2db1638.png +Believe is the twenty-third studio album by American singer-actress Cher...03c91c40-49a6-44a7-90e7-a700edf97a62https://www.last.fm/music/Cher/Believehttps://lastfm.freetls.fastly.net/i/u/34s/3b54885952161aaea4ce2965b2db1638.pnghttps://lastfm.freetls.fastly.net/i/u/64s/3b54885952161aaea4ce2965b2db1638.pnghttps://lastfm.freetls.fastly.net/i/u/174s/3b54885952161aaea4ce2965b2db1638.png diff --git a/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .JSON index 07e7bfa8b..8322d184b 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","albumInfo":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"albumInfo":{}} diff --git a/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .XML index 3dff7bbe8..422a75469 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses AlbumInfo without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON index cf751c278..40c691954 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","albumList":{"album":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"albumList":{"album":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} diff --git a/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML index 7ccca0231..e4f61a704 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON index 497f1609e..441f17c9c 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","albumList":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"albumList":{}} diff --git a/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML index b710114cf..7647de2f9 100644 --- a/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON index 4d4c99f5f..6190d65e3 100644 --- a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","artistInfo":{"biography":"Black Sabbath is an English \u003ca target='_blank' href=\"http://www.last.fm/tag/heavy%20metal\" class=\"bbcode_tag\" rel=\"tag\"\u003eheavy metal\u003c/a\u003e band","musicBrainzId":"5182c1d9-c7d2-4dad-afa0-ccfeada921a8","lastFmUrl":"https://www.last.fm/music/Black+Sabbath","smallImageUrl":"https://userserve-ak.last.fm/serve/64/27904353.jpg","mediumImageUrl":"https://userserve-ak.last.fm/serve/126/27904353.jpg","largeImageUrl":"https://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg","similarArtist":[{"id":"22","name":"Accept"},{"id":"101","name":"Bruce Dickinson"},{"id":"26","name":"Aerosmith"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"artistInfo":{"biography":"Black Sabbath is an English \u003ca target='_blank' href=\"http://www.last.fm/tag/heavy%20metal\" class=\"bbcode_tag\" rel=\"tag\"\u003eheavy metal\u003c/a\u003e band","musicBrainzId":"5182c1d9-c7d2-4dad-afa0-ccfeada921a8","lastFmUrl":"https://www.last.fm/music/Black+Sabbath","smallImageUrl":"https://userserve-ak.last.fm/serve/64/27904353.jpg","mediumImageUrl":"https://userserve-ak.last.fm/serve/126/27904353.jpg","largeImageUrl":"https://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg","similarArtist":[{"id":"22","name":"Accept"},{"id":"101","name":"Bruce Dickinson"},{"id":"26","name":"Aerosmith"}]}} diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML index a3cc029b6..d53a9d2bb 100644 --- a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML @@ -1 +1 @@ -Black Sabbath is an English <a target='_blank' href="http://www.last.fm/tag/heavy%20metal" class="bbcode_tag" rel="tag">heavy metal</a> band5182c1d9-c7d2-4dad-afa0-ccfeada921a8https://www.last.fm/music/Black+Sabbathhttps://userserve-ak.last.fm/serve/64/27904353.jpghttps://userserve-ak.last.fm/serve/126/27904353.jpghttps://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg +Black Sabbath is an English <a target='_blank' href="http://www.last.fm/tag/heavy%20metal" class="bbcode_tag" rel="tag">heavy metal</a> band5182c1d9-c7d2-4dad-afa0-ccfeada921a8https://www.last.fm/music/Black+Sabbathhttps://userserve-ak.last.fm/serve/64/27904353.jpghttps://userserve-ak.last.fm/serve/126/27904353.jpghttps://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON index b237947b5..43d477ab3 100644 --- a/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","artistInfo":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"artistInfo":{}} diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML index 87910d5b2..8e2fa628c 100644 --- a/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON index 42034480f..602279801 100644 --- a/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","bookmarks":{"bookmark":[{"entry":{"id":"1","isDir":false,"title":"title","isVideo":false},"position":123,"username":"user2","comment":"a comment","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"bookmarks":{"bookmark":[{"entry":{"id":"1","isDir":false,"title":"title","isVideo":false},"position":123,"username":"user2","comment":"a comment","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML index cda506634..080d4fc48 100644 --- a/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON index 06316950a..41dfd3651 100644 --- a/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","bookmarks":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"bookmarks":{}} diff --git a/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML index 746ee55b3..9424d82a2 100644 --- a/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Child with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Child with data should match .JSON index 2d9e1ec53..0444d8e7c 100644 --- a/server/subsonic/responses/.snapshots/Responses Child with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Child with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","directory":{"child":[{"id":"1","isDir":true,"title":"title","album":"album","artist":"artist","track":1,"year":1985,"genre":"Rock","coverArt":"1","size":8421341,"contentType":"audio/flac","suffix":"flac","starred":"2016-03-02T20:30:00Z","transcodedContentType":"audio/mpeg","transcodedSuffix":"mp3","duration":146,"bitRate":320,"isVideo":false}],"id":"1","name":"N"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"directory":{"child":[{"id":"1","isDir":true,"title":"title","album":"album","artist":"artist","track":1,"year":1985,"genre":"Rock","coverArt":"1","size":8421341,"contentType":"audio/flac","suffix":"flac","starred":"2016-03-02T20:30:00Z","transcodedContentType":"audio/mpeg","transcodedSuffix":"mp3","duration":146,"bitRate":320,"isVideo":false}],"id":"1","name":"N"}} diff --git a/server/subsonic/responses/.snapshots/Responses Child with data should match .XML b/server/subsonic/responses/.snapshots/Responses Child with data should match .XML index 1eeeaac1b..1ce29024f 100644 --- a/server/subsonic/responses/.snapshots/Responses Child with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Child with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON index ad1d1c3d1..7b3f7de85 100644 --- a/server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","directory":{"child":[{"id":"1","isDir":false,"title":"title","isVideo":false}],"id":"1","name":"N"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"directory":{"child":[{"id":"1","isDir":false,"title":"title","isVideo":false}],"id":"1","name":"N"}} diff --git a/server/subsonic/responses/.snapshots/Responses Directory with data should match .XML b/server/subsonic/responses/.snapshots/Responses Directory with data should match .XML index d161bfb2b..b11f3fce6 100644 --- a/server/subsonic/responses/.snapshots/Responses Directory with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Directory with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON index 3964f66d8..e66f5ac2f 100644 --- a/server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","directory":{"id":"1","name":"N"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"directory":{"id":"1","name":"N"}} diff --git a/server/subsonic/responses/.snapshots/Responses Directory without data should match .XML b/server/subsonic/responses/.snapshots/Responses Directory without data should match .XML index 8cd0bece4..cf5cea641 100644 --- a/server/subsonic/responses/.snapshots/Responses Directory without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Directory without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON index 6348cab1c..3150c9a63 100644 --- a/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0"} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true} diff --git a/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML index bb84788d6..651d6df0d 100644 --- a/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML +++ b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON index 1138cfc69..a81a9666e 100644 --- a/server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","genres":{"genre":[{"value":"Rock","songCount":1000,"albumCount":100},{"value":"Reggae","songCount":500,"albumCount":50},{"value":"Pop","songCount":0,"albumCount":0}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"genres":{"genre":[{"value":"Rock","songCount":1000,"albumCount":100},{"value":"Reggae","songCount":500,"albumCount":50},{"value":"Pop","songCount":0,"albumCount":0}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Genres with data should match .XML b/server/subsonic/responses/.snapshots/Responses Genres with data should match .XML index 038255b1d..cc69c08ae 100644 --- a/server/subsonic/responses/.snapshots/Responses Genres with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Genres with data should match .XML @@ -1 +1 @@ -RockReggaePop +RockReggaePop diff --git a/server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON index ca90b27a6..80049cd50 100644 --- a/server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","genres":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"genres":{}} diff --git a/server/subsonic/responses/.snapshots/Responses Genres without data should match .XML b/server/subsonic/responses/.snapshots/Responses Genres without data should match .XML index f0ba9ea65..48a18fa5b 100644 --- a/server/subsonic/responses/.snapshots/Responses Genres without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Genres without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON index be2e03dba..3ae846832 100644 --- a/server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","indexes":{"index":[{"name":"A","artist":[{"id":"111","name":"aaa","albumCount":2,"starred":"2016-03-02T20:30:00Z","userRating":3,"artistImageUrl":"https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png"}]}],"lastModified":1,"ignoredArticles":"A"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"indexes":{"index":[{"name":"A","artist":[{"id":"111","name":"aaa","albumCount":2,"starred":"2016-03-02T20:30:00Z","userRating":3,"artistImageUrl":"https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png"}]}],"lastModified":1,"ignoredArticles":"A"}} diff --git a/server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML index c8757df96..92836929f 100644 --- a/server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON index 5e9ffa25e..c5c0607d8 100644 --- a/server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","indexes":{"lastModified":1,"ignoredArticles":"A"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"indexes":{"lastModified":1,"ignoredArticles":"A"}} diff --git a/server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML index 7943840df..b4cdef1dd 100644 --- a/server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML @@ -1 +1 @@ - + 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 .JSON index 8b6371e01..eb1a8dc41 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","name":"Example Stream","streamUrl":"https://example.com/stream","homePageUrl":"https://example.com"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"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 .XML index e89e11e38..a0794eeb1 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 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .JSON b/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .JSON index d08b59080..a5dfc5e18 100644 --- a/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","internetRadioStations":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"internetRadioStations":{}} diff --git a/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .XML b/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .XML index e2ed13e4b..d670c3170 100644 --- a/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses InternetRadioStations without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses License should match .JSON b/server/subsonic/responses/.snapshots/Responses License should match .JSON index 89e522485..f815a2098 100644 --- a/server/subsonic/responses/.snapshots/Responses License should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses License should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","license":{"valid":true}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"license":{"valid":true}} diff --git a/server/subsonic/responses/.snapshots/Responses License should match .XML b/server/subsonic/responses/.snapshots/Responses License should match .XML index 0a724f69b..e5a90c467 100644 --- a/server/subsonic/responses/.snapshots/Responses License should match .XML +++ b/server/subsonic/responses/.snapshots/Responses License should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON index bd15ee945..204a358ff 100644 --- a/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","lyrics":{"artist":"Rick Astley","title":"Never Gonna Give You Up","value":"Never gonna give you up\n\t\t\t\tNever gonna let you down\n\t\t\t\tNever gonna run around and desert you\n\t\t\t\tNever gonna say goodbye"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"lyrics":{"artist":"Rick Astley","title":"Never Gonna Give You Up","value":"Never gonna give you up\n\t\t\t\tNever gonna let you down\n\t\t\t\tNever gonna run around and desert you\n\t\t\t\tNever gonna say goodbye"}} diff --git a/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML index 92f3a0012..c7e6f82d7 100644 --- a/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML @@ -1 +1 @@ -Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna say goodbye +Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna say goodbye diff --git a/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON index 5bb964d93..10f5c211d 100644 --- a/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","lyrics":{"value":""}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"lyrics":{"value":""}} diff --git a/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML index 3a2ae01a4..9abc77e1f 100644 --- a/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON index 634549ea6..fb79b75c1 100644 --- a/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","musicFolders":{"musicFolder":[{"id":111,"name":"aaa"},{"id":222,"name":"bbb"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"musicFolders":{"musicFolder":[{"id":111,"name":"aaa"},{"id":222,"name":"bbb"}]}} diff --git a/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML index 4a4e88b58..da940c3ff 100644 --- a/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON index d0a73ebdc..ee512ae47 100644 --- a/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","musicFolders":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"musicFolders":{}} diff --git a/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML index 71a88eed3..63848d75d 100644 --- a/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON index 3821ebd68..2603112b5 100644 --- a/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playQueue":{"entry":[{"id":"1","isDir":false,"title":"title","isVideo":false}],"current":"111","position":243,"username":"user1","changed":"0001-01-01T00:00:00Z","changedBy":"a_client"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"playQueue":{"entry":[{"id":"1","isDir":false,"title":"title","isVideo":false}],"current":"111","position":243,"username":"user1","changed":"0001-01-01T00:00:00Z","changedBy":"a_client"}} diff --git a/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML index 9e0f82aef..d96030df5 100644 --- a/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON index 0386aaa90..d13e3ae8c 100644 --- a/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playQueue":{"username":"","changedBy":""}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"playQueue":{"username":"","changedBy":""}} diff --git a/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML index 42ccb087f..b2a09b360 100644 --- a/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON index ca11eb3bf..9f1f57e01 100644 --- a/server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playlists":{"playlist":[{"id":"111","name":"aaa","comment":"comment","songCount":2,"duration":120,"public":true,"owner":"admin","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z","coverArt":"pl-123123123123"},{"id":"222","name":"bbb","songCount":0,"duration":0,"public":false,"created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"playlists":{"playlist":[{"id":"111","name":"aaa","comment":"comment","songCount":2,"duration":120,"public":true,"owner":"admin","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z","coverArt":"pl-123123123123"},{"id":"222","name":"bbb","songCount":0,"duration":0,"public":false,"created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML index c97edbf09..cd6d1ccac 100644 --- a/server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON index 3dec0b4b7..cd9ece060 100644 --- a/server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","playlists":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"playlists":{}} diff --git a/server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML index c12651c91..90bf400ed 100644 --- a/server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON index 3a4da64ad..8e8b0e1bf 100644 --- a/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","scanStatus":{"scanning":true,"count":456,"folderCount":123,"lastScan":"2006-01-02T15:04:00Z"}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"scanStatus":{"scanning":true,"count":456,"folderCount":123,"lastScan":"2006-01-02T15:04:00Z"}} diff --git a/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML index 8a88d16d0..69c2e9c05 100644 --- a/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON index cacbff46c..4b65e3fee 100644 --- a/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","scanStatus":{"scanning":false,"count":0,"folderCount":0}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"scanStatus":{"scanning":false,"count":0,"folderCount":0}} diff --git a/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML index b8f0d866e..9d3b38d19 100644 --- a/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Shares with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Shares with data should match .JSON index 1a75ee788..e35b2729b 100644 --- a/server/subsonic/responses/.snapshots/Responses Shares with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Shares with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","shares":{"share":[{"entry":[{"id":"1","isDir":false,"title":"title","album":"album","artist":"artist","duration":120,"isVideo":false},{"id":"2","isDir":false,"title":"title 2","album":"album","artist":"artist","duration":300,"isVideo":false}],"id":"ABC123","url":"http://localhost/p/ABC123","description":"Check it out!","username":"deluan","created":"0001-01-01T00:00:00Z","expires":"0001-01-01T00:00:00Z","lastVisited":"0001-01-01T00:00:00Z","visitCount":2}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"shares":{"share":[{"entry":[{"id":"1","isDir":false,"title":"title","album":"album","artist":"artist","duration":120,"isVideo":false},{"id":"2","isDir":false,"title":"title 2","album":"album","artist":"artist","duration":300,"isVideo":false}],"id":"ABC123","url":"http://localhost/p/ABC123","description":"Check it out!","username":"deluan","created":"0001-01-01T00:00:00Z","expires":"0001-01-01T00:00:00Z","lastVisited":"0001-01-01T00:00:00Z","visitCount":2}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Shares with data should match .XML b/server/subsonic/responses/.snapshots/Responses Shares with data should match .XML index 371c2c138..4fa5cda16 100644 --- a/server/subsonic/responses/.snapshots/Responses Shares with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Shares with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Shares without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Shares without data should match .JSON index 5271cb8ea..bf12c71ed 100644 --- a/server/subsonic/responses/.snapshots/Responses Shares without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Shares without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","shares":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"shares":{}} diff --git a/server/subsonic/responses/.snapshots/Responses Shares without data should match .XML b/server/subsonic/responses/.snapshots/Responses Shares without data should match .XML index dbf58a6d5..6b8aec3fd 100644 --- a/server/subsonic/responses/.snapshots/Responses Shares without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Shares without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON index 49f25fc91..1a09565e5 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","similarSongs":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"similarSongs":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML index 29e13bb60..f0a2e0163 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON index 3ae1c3e8f..642ee62b5 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","similarSongs":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"similarSongs":{}} diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML index b8506c7d4..ff1ad253d 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON index 0aea25e17..2236dc35b 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","similarSongs2":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"similarSongs2":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML index d9d1db3a0..090a59d73 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON index 0293c5afa..e7e220622 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","similarSongs2":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"similarSongs2":{}} diff --git a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML index 834a853b4..0c07e9348 100644 --- a/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON index b8044a506..889707ae2 100644 --- a/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","topSongs":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"topSongs":{"song":[{"id":"1","isDir":false,"title":"title","isVideo":false}]}} diff --git a/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML index a4e62d774..bda5a0a60 100644 --- a/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON index d578a767d..dba6277cd 100644 --- a/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","topSongs":{}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"topSongs":{}} diff --git a/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML index cec47f95e..479cf867a 100644 --- a/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses User with data should match .JSON b/server/subsonic/responses/.snapshots/Responses User with data should match .JSON index 917d9c367..f54aba0d3 100644 --- a/server/subsonic/responses/.snapshots/Responses User with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses User with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","user":{"username":"deluan","email":"navidrome@deluan.com","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"user":{"username":"deluan","email":"navidrome@deluan.com","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}} diff --git a/server/subsonic/responses/.snapshots/Responses User with data should match .XML b/server/subsonic/responses/.snapshots/Responses User with data should match .XML index ad4245097..cc107ad20 100644 --- a/server/subsonic/responses/.snapshots/Responses User with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses User with data should match .XML @@ -1 +1 @@ -1 +1 diff --git a/server/subsonic/responses/.snapshots/Responses User without data should match .JSON b/server/subsonic/responses/.snapshots/Responses User without data should match .JSON index 0fec700d0..f904447a7 100644 --- a/server/subsonic/responses/.snapshots/Responses User without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses User without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","user":{"username":"deluan","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"user":{"username":"deluan","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false}} diff --git a/server/subsonic/responses/.snapshots/Responses User without data should match .XML b/server/subsonic/responses/.snapshots/Responses User without data should match .XML index d49c10785..094b1e333 100644 --- a/server/subsonic/responses/.snapshots/Responses User without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses User without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/.snapshots/Responses Users with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Users with data should match .JSON index f2a9ec6be..eee65ff25 100644 --- a/server/subsonic/responses/.snapshots/Responses Users with data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Users with data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","users":{"user":[{"username":"deluan","email":"navidrome@deluan.com","scrobblingEnabled":false,"adminRole":true,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"users":{"user":[{"username":"deluan","email":"navidrome@deluan.com","scrobblingEnabled":false,"adminRole":true,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Users with data should match .XML b/server/subsonic/responses/.snapshots/Responses Users with data should match .XML index 1a3462072..4c5ebbe9e 100644 --- a/server/subsonic/responses/.snapshots/Responses Users with data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Users with data should match .XML @@ -1 +1 @@ -1 +1 diff --git a/server/subsonic/responses/.snapshots/Responses Users without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Users without data should match .JSON index 365eabd09..601ea1d6e 100644 --- a/server/subsonic/responses/.snapshots/Responses Users without data should match .JSON +++ b/server/subsonic/responses/.snapshots/Responses Users without data should match .JSON @@ -1 +1 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","users":{"user":[{"username":"deluan","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false}]}} +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","openSubsonic":true,"users":{"user":[{"username":"deluan","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false}]}} diff --git a/server/subsonic/responses/.snapshots/Responses Users without data should match .XML b/server/subsonic/responses/.snapshots/Responses Users without data should match .XML index a92c2e2fa..fb7ce1161 100644 --- a/server/subsonic/responses/.snapshots/Responses Users without data should match .XML +++ b/server/subsonic/responses/.snapshots/Responses Users without data should match .XML @@ -1 +1 @@ - + diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.go index 916aeb4a7..0df2c0ad8 100644 --- a/server/subsonic/responses/responses.go +++ b/server/subsonic/responses/responses.go @@ -11,6 +11,7 @@ type Subsonic struct { Version string `xml:"version,attr" json:"version"` Type string `xml:"type,attr" json:"type"` ServerVersion string `xml:"serverVersion,attr" json:"serverVersion"` + OpenSubsonic bool `xml:"openSubsonic,attr,omitempty" json:"openSubsonic,omitempty"` Error *Error `xml:"error,omitempty" json:"error,omitempty"` License *License `xml:"license,omitempty" json:"license,omitempty"` MusicFolders *MusicFolders `xml:"musicFolders,omitempty" json:"musicFolders,omitempty"` @@ -50,7 +51,8 @@ type Subsonic struct { ScanStatus *ScanStatus `xml:"scanStatus,omitempty" json:"scanStatus,omitempty"` Lyrics *Lyrics `xml:"lyrics,omitempty" json:"lyrics,omitempty"` - InternetRadioStations *InternetRadioStations `xml:"internetRadioStations,omitempty" json:"internetRadioStations,omitempty"` + InternetRadioStations *InternetRadioStations `xml:"internetRadioStations,omitempty" json:"internetRadioStations,omitempty"` + OpenSubsonicExtensions *OpenSubsonicExtensions `xml:"openSubsonicExtensions,omitempty" json:"openSubsonicExtensions,omitempty"` } type JsonWrapper struct { @@ -399,3 +401,5 @@ type Radio struct { StreamUrl string `xml:"streamUrl,attr" json:"streamUrl"` HomepageUrl string `xml:"homePageUrl,omitempty,attr" json:"homePageUrl,omitempty"` } + +type OpenSubsonicExtensions struct{} diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.go index 850317aa1..c4681221e 100644 --- a/server/subsonic/responses/responses_test.go +++ b/server/subsonic/responses/responses_test.go @@ -19,7 +19,13 @@ import ( var _ = Describe("Responses", func() { var response *Subsonic BeforeEach(func() { - response = &Subsonic{Status: "ok", Version: "1.8.0", Type: consts.AppName, ServerVersion: "v0.0.0"} + response = &Subsonic{ + Status: "ok", + Version: "1.8.0", + Type: consts.AppName, + ServerVersion: "v0.0.0", + OpenSubsonic: true, + } }) Describe("EmptyResponse", func() {