🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add more OpenSubsonic fields
Deluanf580c5b8bc60
diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.goindex dd500c60c..ce88988d2 100644--- a/server/subsonic/helpers.go+++ b/server/subsonic/helpers.go@@ -188,6 +188,8 @@ func childFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Childchild.BookmarkPosition = mf.BookmarkPositionchild.Comment = mf.Commentchild.Bpm = int32(mf.Bpm)+ child.MediaType = responses.MediaTypeSong+ child.MusicBrainzId = mf.MbzRecordingIDreturn child}@@ -236,6 +238,8 @@ func childFromAlbum(_ context.Context, al model.Album) responses.Child {child.Played = &al.PlayDate}child.UserRating = int32(al.Rating)+ child.MediaType = responses.MediaTypeAlbum+ child.MusicBrainzId = al.MbzAlbumIDreturn child}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 .JSONindex dbbf6396f..db626b5c5 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "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 d17a9e812..a45332c19 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" bpm="0" comment=""></album>+ <album id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 7ab8e7d5b..7934ea4a7 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@@ -8,8 +8,8 @@"id": "1","name": "album","artist": "artist",- "userRating": 0,"genre": "rock",+ "userRating": 0,"genres": [{"name": "rock"@@ -29,14 +29,6 @@"track": 1,"year": 1985,"genre": "Rock",- "genres": [- {- "name": "rock"- },- {- "name": "progressive"- }- ],"coverArt": "1","size": 8421341,"contentType": "audio/flac",@@ -47,8 +39,18 @@"duration": 146,"bitRate": 320,"isVideo": false,+ "mediaType": "song",+ "musicBrainzId": "4321","bpm": 127,- "comment": "a comment"+ "comment": "a comment",+ "genres": [+ {+ "name": "rock"+ },+ {+ "name": "progressive"+ }+ ]}]}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 9ca452e7c..128dab3e5 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" userRating="0" genre="rock" musicBrainzId="1234">+ <album id="1" name="album" artist="artist" genre="rock" userRating="0" musicBrainzId="1234"><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" 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" mediaType="song" musicBrainzId="4321" bpm="127" comment="a comment"><genres name="rock"></genres><genres name="progressive"></genres></song>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 9c8600177..c87488cbf 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@@ -11,10 +11,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []},"position": 123,"username": "user2",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 f753cdc82..cb2ac042f 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" bpm="0" comment=""></entry>+ <entry id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 0c7330801..bab848ffd 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@@ -15,14 +15,6 @@"track": 1,"year": 1985,"genre": "Rock",- "genres": [- {- "name": "rock"- },- {- "name": "progressive"- }- ],"coverArt": "1","size": 8421341,"contentType": "audio/flac",@@ -33,8 +25,18 @@"duration": 146,"bitRate": 320,"isVideo": false,+ "mediaType": "song",+ "musicBrainzId": "4321","bpm": 127,- "comment": "a comment"+ "comment": "a comment",+ "genres": [+ {+ "name": "rock"+ },+ {+ "name": "progressive"+ }+ ]}],"id": "1",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 22ab7893b..1ddcf490f 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" 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" mediaType="song" musicBrainzId="4321" bpm="127" comment="a comment"><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 b239d6476..657eca88e 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@@ -9,10 +9,12 @@{"id": "1","isDir": false,- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []}],"id": "",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 2b736b573..209894db4 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" bpm="0" comment=""></child>+ <child id="1" isDir="false" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 05c5efc0c..1496372ef 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []}],"id": "1",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 2f1da276b..dd507bea1 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" bpm="0" comment=""></child>+ <child id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 bbc33ddb0..2d5bb7a35 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []}],"current": "111",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 5d7155d44..49cb2416c 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" bpm="0" comment=""></entry>+ <entry id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 1547d7458..71caff2ae 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@@ -14,11 +14,13 @@"title": "title","album": "album","artist": "artist",- "genres": [],"duration": 120,"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []},{"id": "2",@@ -26,11 +28,13 @@"title": "title 2","album": "album","artist": "artist",- "genres": [],"duration": 300,"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "genres": []}],"id": "ABC123",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 de0ba71da..c85d8c0ce 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" bpm="0" comment=""></entry>- <entry id="2" isDir="false" title="title 2" album="album" artist="artist" duration="300" isVideo="false" bpm="0" comment=""></entry>+ <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></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 96c42074a..85b979687 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "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 bfd6c31e0..a48b660dc 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" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 45aaf997e..deaada7db 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "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 00da80758..003cf1d11 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" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></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 4deb55314..b87123262 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@@ -10,10 +10,12 @@"id": "1","isDir": false,"title": "title",- "genres": [],"isVideo": false,+ "mediaType": "",+ "musicBrainzId": "","bpm": 0,- "comment": ""+ "comment": "",+ "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 1acf56f1b..88013f911 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" bpm="0" comment=""></song>+ <song id="1" isDir="false" title="title" isVideo="false" mediaType="" musicBrainzId="" bpm="0" comment=""></song></topSongs></subsonic-response>diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.goindex 07c3b07f0..3e88d1ae2 100644--- a/server/subsonic/responses/responses.go+++ b/server/subsonic/responses/responses.go@@ -106,6 +106,14 @@ type Indexes struct {IgnoredArticles string `xml:"ignoredArticles,attr" json:"ignoredArticles"`}+type MediaType string++const (+ MediaTypeSong MediaType = "song"+ MediaTypeAlbum MediaType = "album"+ MediaTypeArtist MediaType = "artist"+)+type Child struct {Id string `xml:"id,attr" json:"id"`Parent string `xml:"parent,attr,omitempty" json:"parent,omitempty"`@@ -117,7 +125,6 @@ type Child struct {Track int32 `xml:"track,attr,omitempty" json:"track,omitempty"`Year int32 `xml:"year,attr,omitempty" json:"year,omitempty"`Genre string `xml:"genre,attr,omitempty" json:"genre,omitempty"`- Genres ItemGenres `xml:"genres" json:"genres"`CoverArt string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`Size int64 `xml:"size,attr,omitempty" json:"size,omitempty"`ContentType string `xml:"contentType,attr,omitempty" json:"contentType,omitempty"`@@ -129,7 +136,6 @@ type Child struct {BitRate int32 `xml:"bitRate,attr,omitempty" json:"bitRate,omitempty"`Path string `xml:"path,attr,omitempty" json:"path,omitempty"`PlayCount int64 `xml:"playCount,attr,omitempty" json:"playCount,omitempty"`- Played *time.Time `xml:"played,attr,omitempty" json:"played,omitempty"`DiscNumber int32 `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"`Created *time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`AlbumId string `xml:"albumId,attr,omitempty" json:"albumId,omitempty"`@@ -139,11 +145,16 @@ type Child struct {SongCount int32 `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`IsVideo bool `xml:"isVideo,attr" json:"isVideo"`BookmarkPosition int64 `xml:"bookmarkPosition,attr,omitempty" json:"bookmarkPosition,omitempty"`- Bpm int32 `xml:"bpm,attr" json:"bpm"`- Comment string `xml:"comment,attr" json:"comment"`/*<xs:attribute name="averageRating" type="sub:AverageRating" use="optional"/> <!-- Added in 1.6.0 -->*/+ // OpenSubsonic extensions+ Played *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"`+ Genres ItemGenres `xml:"genres" json:"genres"`}type Songs struct {@@ -188,22 +199,24 @@ type ArtistID3 struct {}type AlbumID3 struct {- Id string `xml:"id,attr" json:"id"`- Name string `xml:"name,attr" json:"name"`- Artist string `xml:"artist,attr,omitempty" json:"artist,omitempty"`- ArtistId string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`- CoverArt string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`- SongCount int32 `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`- Duration int32 `xml:"duration,attr,omitempty" json:"duration,omitempty"`- PlayCount int64 `xml:"playCount,attr,omitempty" json:"playCount,omitempty"`- Played *time.Time `xml:"played,attr,omitempty" json:"played,omitempty"`- Created *time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`- Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`- UserRating int32 `xml:"userRating,attr" json:"userRating"`- Year int32 `xml:"year,attr,omitempty" json:"year,omitempty"`- Genre string `xml:"genre,attr,omitempty" json:"genre,omitempty"`- Genres ItemGenres `xml:"genres" json:"genres"`- MusicBrainzId string `xml:"musicBrainzId,attr" json:"musicBrainzId"`+ Id string `xml:"id,attr" json:"id"`+ Name string `xml:"name,attr" json:"name"`+ Artist string `xml:"artist,attr,omitempty" json:"artist,omitempty"`+ ArtistId string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`+ CoverArt string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`+ SongCount int32 `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`+ Duration int32 `xml:"duration,attr,omitempty" json:"duration,omitempty"`+ PlayCount int64 `xml:"playCount,attr,omitempty" json:"playCount,omitempty"`+ Created *time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`+ Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`+ Year int32 `xml:"year,attr,omitempty" json:"year,omitempty"`+ Genre string `xml:"genre,attr,omitempty" json:"genre,omitempty"`++ // OpenSubsonic extensions+ Played *time.Time `xml:"played,attr,omitempty" json:"played,omitempty"`+ UserRating int32 `xml:"userRating,attr" json:"userRating"`+ Genres ItemGenres `xml:"genres" json:"genres"`+ MusicBrainzId string `xml:"musicBrainzId,attr" json:"musicBrainzId"`}type ArtistWithAlbumsID3 struct {diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.goindex 14cc2d26c..08ff758f8 100644--- a/server/subsonic/responses/responses_test.go+++ b/server/subsonic/responses/responses_test.go@@ -142,7 +142,7 @@ var _ = Describe("Responses", func() {Year: 1985, Genre: "Rock", CoverArt: "1", Size: 8421341, ContentType: "audio/flac",Suffix: "flac", TranscodedContentType: "audio/mpeg", TranscodedSuffix: "mp3",Duration: 146, BitRate: 320, Starred: &t, Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},- Comment: "a comment", Bpm: 127,+ Comment: "a comment", Bpm: 127, MediaType: MediaTypeSong, MusicBrainzId: "4321",}response.Directory.Child = child})@@ -179,7 +179,7 @@ var _ = Describe("Responses", func() {Year: 1985, Genre: "Rock", CoverArt: "1", Size: 8421341, ContentType: "audio/flac",Suffix: "flac", TranscodedContentType: "audio/mpeg", TranscodedSuffix: "mp3",Duration: 146, BitRate: 320, Starred: &t, Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},- Comment: "a comment", Bpm: 127,+ Comment: "a comment", Bpm: 127, MediaType: MediaTypeSong, MusicBrainzId: "4321",}}response.AlbumWithSongsID3.AlbumID3 = albumresponse.AlbumWithSongsID3.Song = songs