fix(subsonic): never omit duration for AlbumID3 (#5217)
This commit is contained in:
+1
@@ -8,6 +8,7 @@
|
|||||||
"id": "1",
|
"id": "1",
|
||||||
"name": "album",
|
"name": "album",
|
||||||
"artist": "artist",
|
"artist": "artist",
|
||||||
|
"duration": 292,
|
||||||
"genre": "rock",
|
"genre": "rock",
|
||||||
"userRating": 4,
|
"userRating": 4,
|
||||||
"genres": [
|
"genres": [
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
||||||
<album id="1" name="album" artist="artist" genre="rock" userRating="4" musicBrainzId="1234" isCompilation="true" sortName="sorted album" displayArtist="artist1 & artist2" explicitStatus="clean" version="Deluxe Edition">
|
<album id="1" name="album" artist="artist" duration="292" genre="rock" userRating="4" musicBrainzId="1234" isCompilation="true" sortName="sorted album" displayArtist="artist1 & artist2" explicitStatus="clean" version="Deluxe Edition">
|
||||||
<genres name="rock"></genres>
|
<genres name="rock"></genres>
|
||||||
<genres name="progressive"></genres>
|
<genres name="progressive"></genres>
|
||||||
<discTitles disc="1" title="disc 1"></discTitles>
|
<discTitles disc="1" title="disc 1"></discTitles>
|
||||||
|
|||||||
+2
-1
@@ -6,6 +6,7 @@
|
|||||||
"openSubsonic": true,
|
"openSubsonic": true,
|
||||||
"album": {
|
"album": {
|
||||||
"id": "",
|
"id": "",
|
||||||
"name": ""
|
"name": "",
|
||||||
|
"duration": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
||||||
<album id="" name=""></album>
|
<album id="" name="" duration="0"></album>
|
||||||
</subsonic-response>
|
</subsonic-response>
|
||||||
|
|||||||
+1
@@ -7,6 +7,7 @@
|
|||||||
"album": {
|
"album": {
|
||||||
"id": "",
|
"id": "",
|
||||||
"name": "",
|
"name": "",
|
||||||
|
"duration": 0,
|
||||||
"userRating": 0,
|
"userRating": 0,
|
||||||
"genres": [],
|
"genres": [],
|
||||||
"musicBrainzId": "",
|
"musicBrainzId": "",
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.16.1" type="navidrome" serverVersion="v0.55.0" openSubsonic="true">
|
||||||
<album id="" name=""></album>
|
<album id="" name="" duration="0"></album>
|
||||||
</subsonic-response>
|
</subsonic-response>
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ type AlbumID3 struct {
|
|||||||
ArtistId string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
|
ArtistId string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
|
||||||
CoverArt string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`
|
CoverArt string `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`
|
||||||
SongCount int32 `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`
|
SongCount int32 `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`
|
||||||
Duration int32 `xml:"duration,attr,omitempty" json:"duration,omitempty"`
|
Duration int32 `xml:"duration,attr" json:"duration"`
|
||||||
PlayCount int64 `xml:"playCount,attr,omitempty" json:"playCount,omitempty"`
|
PlayCount int64 `xml:"playCount,attr,omitempty" json:"playCount,omitempty"`
|
||||||
Created *time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
|
Created *time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
|
||||||
Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`
|
Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ var _ = Describe("Responses", func() {
|
|||||||
Context("with data", func() {
|
Context("with data", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
album := AlbumID3{
|
album := AlbumID3{
|
||||||
Id: "1", Name: "album", Artist: "artist", Genre: "rock",
|
Id: "1", Name: "album", Artist: "artist", Duration: 292, Genre: "rock",
|
||||||
}
|
}
|
||||||
album.OpenSubsonicAlbumID3 = &OpenSubsonicAlbumID3{
|
album.OpenSubsonicAlbumID3 = &OpenSubsonicAlbumID3{
|
||||||
Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},
|
Genres: []ItemGenre{{Name: "rock"}, {Name: "progressive"}},
|
||||||
|
|||||||
Reference in New Issue
Block a user