🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add more OpenSubsonic fields
Deluancdccdc56c907
diff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.goindex 7c75c7427..bc6bb2465 100644--- a/server/subsonic/browsing.go+++ b/server/subsonic/browsing.go@@ -432,6 +432,8 @@ func (api *Router) buildAlbum(ctx context.Context, album *model.Album, mfs modeldir.Starred = &album.StarredAt}dir.MusicBrainzId = album.MbzAlbumID+ dir.IsCompilation = album.Compilation+ dir.SortName = album.SortAlbumNamedir.Song = childrenFromMediaFiles(ctx, mfs)return dir}diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.goindex ce88988d2..1d10ea23d 100644--- a/server/subsonic/helpers.go+++ b/server/subsonic/helpers.go@@ -111,6 +111,7 @@ func toArtistID3(r *http.Request, a model.Artist) responses.ArtistID3 {ArtistImageUrl: public.ImageURL(r, a.CoverArtID(), 600),UserRating: int32(a.Rating),MusicBrainzId: a.MbzArtistID,+ SortName: a.SortArtistName,}if a.Starred {artist.Starred = &a.StarredAt@@ -187,6 +188,7 @@ func childFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Child}child.BookmarkPosition = mf.BookmarkPositionchild.Comment = mf.Comment+ child.SortName = mf.SortTitlechild.Bpm = int32(mf.Bpm)child.MediaType = responses.MediaTypeSongchild.MusicBrainzId = mf.MbzRecordingID@@ -238,6 +240,7 @@ func childFromAlbum(_ context.Context, al model.Album) responses.Child {child.Played = &al.PlayDate}child.UserRating = int32(al.Rating)+ child.SortName = al.SortAlbumNamechild.MediaType = responses.MediaTypeAlbumchild.MusicBrainzId = al.MbzAlbumIDreturn childdiff --git a/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSONindex db626b5c5..a2dd3a7ea 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}]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 .XMLindex a45332c19..549d7a17c 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><albumList>- <album id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></album>+ <album id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></album></albumList></subsonic-response>diff --git a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .JSONindex 7934ea4a7..6a6d74e6b 100644--- a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .JSON+++ b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .JSON@@ -19,6 +19,8 @@}],"musicBrainzId": "1234",+ "isCompilation": true,+ "sortName": "sorted album","song": [{"id": "1",@@ -39,10 +41,11 @@"duration": 146,"bitRate": 320,"isVideo": false,- "mediaType": "song",- "musicBrainzId": "4321","bpm": 127,"comment": "a comment",+ "sortName": "sorted song",+ "mediaType": "song",+ "musicBrainzId": "4321","genres": [{"name": "rock"diff --git a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .XMLindex 128dab3e5..b329443e9 100644--- a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .XML+++ b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 with data should match .XML@@ -1,8 +1,8 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true">- <album id="1" name="album" artist="artist" genre="rock" userRating="0" musicBrainzId="1234">+ <album id="1" name="album" artist="artist" genre="rock" userRating="0" musicBrainzId="1234" isCompilation="true" sortName="sorted album"><genres name="rock"></genres><genres name="progressive"></genres>- <song 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" mediaType="song" musicBrainzId="4321" bpm="127" comment="a comment">+ <song 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" bpm="127" comment="a comment" sortName="sorted song" mediaType="song" musicBrainzId="4321"><genres name="rock"></genres><genres name="progressive"></genres></song>diff --git a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .JSONindex 6c2024a08..ead02f6f5 100644--- a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .JSON+++ b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .JSON@@ -9,6 +9,8 @@"name": "","userRating": 0,"genres": [],- "musicBrainzId": ""+ "musicBrainzId": "",+ "isCompilation": false,+ "sortName": ""}}diff --git a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .XMLindex affb6490b..58e03c04b 100644--- a/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .XML+++ b/server/subsonic/responses/.snapshots/Responses AlbumWithSongsID3 without data should match .XML@@ -1,3 +1,3 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true">- <album id="" name="" userRating="0" musicBrainzId=""></album>+ <album id="" name="" userRating="0" musicBrainzId="" isCompilation="false" sortName=""></album></subsonic-response>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 .JSONindex c87488cbf..8f0ac4f95 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@@ -12,10 +12,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []},"position": 123,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 .XMLindex cb2ac042f..f3bfe4112 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,7 +1,7 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><bookmarks><bookmark position="123" username="user2" comment="a comment" created="0001-01-01T00:00:00Z" changed="0001-01-01T00:00:00Z">- <entry id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></entry>+ <entry id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></entry></bookmark></bookmarks></subsonic-response>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 .JSONindex bab848ffd..9c169f3b7 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@@ -25,10 +25,11 @@"duration": 146,"bitRate": 320,"isVideo": false,- "mediaType": "song",- "musicBrainzId": "4321","bpm": 127,"comment": "a comment",+ "sortName": "",+ "mediaType": "song",+ "musicBrainzId": "4321","genres": [{"name": "rock"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 .XMLindex 1ddcf490f..28f2559b2 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,6 +1,6 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><directory id="1" name="N">- <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" mediaType="song" musicBrainzId="4321" bpm="127" comment="a comment">+ <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" bpm="127" comment="a comment" sortName="" mediaType="song" musicBrainzId="4321"><genres name="rock"></genres><genres name="progressive"></genres></child>diff --git a/server/subsonic/responses/.snapshots/Responses Child without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Child without data should match .JSONindex 657eca88e..ba8b9fdbc 100644--- a/server/subsonic/responses/.snapshots/Responses Child without data should match .JSON+++ b/server/subsonic/responses/.snapshots/Responses Child without data should match .JSON@@ -10,10 +10,11 @@"id": "1","isDir": false,"isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}],diff --git a/server/subsonic/responses/.snapshots/Responses Child without data should match .XML b/server/subsonic/responses/.snapshots/Responses Child without data should match .XMLindex 209894db4..f00a262a8 100644--- a/server/subsonic/responses/.snapshots/Responses Child without data should match .XML+++ b/server/subsonic/responses/.snapshots/Responses Child without data should match .XML@@ -1,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><directory id="" name="">- <child id="1" isDir="false" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></child>+ <child id="1" isDir="false" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></child></directory></subsonic-response>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 .JSONindex 1496372ef..50515bde9 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}],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 .XMLindex dd507bea1..ee2083724 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><directory id="1" name="N">- <child id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></child>+ <child id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></child></directory></subsonic-response>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 .JSONindex 2d5bb7a35..3d299be63 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}],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 .XMLindex 49cb2416c..0b9211576 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><playQueue current="111" position="243" username="user1" changed="0001-01-01T00:00:00Z" changedBy="a_client">- <entry id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></entry>+ <entry id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></entry></playQueue></subsonic-response>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 .JSONindex 71caff2ae..8fa03c3b3 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@@ -16,10 +16,11 @@"artist": "artist","duration": 120,"isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []},{@@ -30,10 +31,11 @@"artist": "artist","duration": 300,"isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}],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 .XMLindex c85d8c0ce..18a2b6ff4 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,8 +1,8 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><shares><share 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">- <entry id="1" isDir="false" title="title" album="album" artist="artist" duration="120" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></entry>- <entry id="2" isDir="false" title="title 2" album="album" artist="artist" duration="300" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></entry>+ <entry id="1" isDir="false" title="title" album="album" artist="artist" duration="120" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></entry>+ <entry id="2" isDir="false" title="title 2" album="album" artist="artist" duration="300" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></entry></share></shares></subsonic-response>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 .JSONindex 85b979687..51951b04e 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}]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 .XMLindex a48b660dc..9ef47632f 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><similarSongs>- <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></song></similarSongs></subsonic-response>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 .JSONindex deaada7db..b4cb7aced 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}]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 .XMLindex 003cf1d11..faac7083d 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><similarSongs2>- <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></song></similarSongs2></subsonic-response>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 .JSONindex b87123262..0c3a9c53f 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@@ -11,10 +11,11 @@"isDir": false,"title": "title","isVideo": false,- "mediaType": "",- "musicBrainzId": "","bpm": 0,"comment": "",+ "sortName": "",+ "mediaType": "",+ "musicBrainzId": "","genres": []}]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 .XMLindex 88013f911..1daf29044 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,5 +1,5 @@<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.8.0" type="navidrome" serverVersion="v0.0.0" openSubsonic="true"><topSongs>- <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" bpm="0" comment="" sortName="" mediaType="" musicBrainzId=""></song></topSongs></subsonic-response>diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.goindex 3e88d1ae2..6c74936d1 100644--- a/server/subsonic/responses/responses.go+++ b/server/subsonic/responses/responses.go@@ -150,10 +150,11 @@ type Child struct {*/// OpenSubsonic extensionsPlayed *time.Time `xml:"played,attr,omitempty" json:"played,omitempty"`- MediaType MediaType `xml:"mediaType,attr" json:"mediaType"`- MusicBrainzId string `xml:"musicBrainzId,attr" json:"musicBrainzId"`Bpm int32 `xml:"bpm,attr" json:"bpm"`Comment string `xml:"comment,attr" json:"comment"`+ SortName string `xml:"sortName,attr" json:"sortName"`+ MediaType MediaType `xml:"mediaType,attr" json:"mediaType"`+ MusicBrainzId string `xml:"musicBrainzId,attr" json:"musicBrainzId"`Genres ItemGenres `xml:"genres" json:"genres"`}@@ -195,7 +196,10 @@ type ArtistID3 struct {Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`UserRating int32 `xml:"userRating,attr,omitempty" json:"userRating,omitempty"`ArtistImageUrl string `xml:"artistImageUrl,attr,omitempty" json:"artistImageUrl,omitempty"`- MusicBrainzId string `xml:"musicBrainzId,attr,omitempty" json:"musicBrainzId,omitempty"`++ // OpenSubsonic extensions+ MusicBrainzId string `xml:"musicBrainzId,attr,omitempty" json:"musicBrainzId,omitempty"`+ SortName string `xml:"sortName,attr,omitempty" json:"sortName,omitempty"`}type AlbumID3 struct {@@ -217,6 +221,8 @@ type AlbumID3 struct {UserRating int32 `xml:"userRating,attr" json:"userRating"`Genres ItemGenres `xml:"genres" json:"genres"`MusicBrainzId string `xml:"musicBrainzId,attr" json:"musicBrainzId"`+ IsCompilation bool `xml:"isCompilation,attr" json:"isCompilation"`+ SortName string `xml:"sortName,attr" json:"sortName"`}type ArtistWithAlbumsID3 struct {diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.goindex 08ff758f8..832214790 100644--- a/server/subsonic/responses/responses_test.go+++ b/server/subsonic/responses/responses_test.go@@ -171,8 +171,11 @@ var _ = Describe("Responses", func() {Context("with data", func() {BeforeEach(func() {- album := AlbumID3{Id: "1", Name: "album", Artist: "artist", Genre: "rock",- Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}}, MusicBrainzId: "1234"}+ album := AlbumID3{+ Id: "1", Name: "album", Artist: "artist", Genre: "rock",+ Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},+ MusicBrainzId: "1234", IsCompilation: true, SortName: "sorted album",+ }t := time.Date(2016, 03, 2, 20, 30, 0, 0, time.UTC)songs := []Child{{Id: "1", IsDir: true, Title: "title", Album: "album", Artist: "artist", Track: 1,@@ -180,6 +183,7 @@ var _ = Describe("Responses", func() {Suffix: "flac", TranscodedContentType: "audio/mpeg", TranscodedSuffix: "mp3",Duration: 146, BitRate: 320, Starred: &t, Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},Comment: "a comment", Bpm: 127, MediaType: MediaTypeSong, MusicBrainzId: "4321",+ SortName: "sorted song",}}response.AlbumWithSongsID3.AlbumID3 = albumresponse.AlbumWithSongsID3.Song = songs