mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 03:07:24 +03:00
Expose OpenSubsonic release date for album (#2906)
* [enhancement]: OS expose release date for album, make original optional * not optional * remove omitempty
This commit is contained in:
parent
e81bf5125f
commit
f12dfb485a
@ -321,6 +321,7 @@ func buildAlbumID3(ctx context.Context, album model.Album) responses.AlbumID3 {
|
||||
dir.IsCompilation = album.Compilation
|
||||
dir.SortName = album.SortAlbumName
|
||||
dir.OriginalReleaseDate = toItemDate(album.OriginalDate)
|
||||
dir.ReleaseDate = toItemDate(album.ReleaseDate)
|
||||
return dir
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,11 @@
|
||||
"month": 2,
|
||||
"day": 4
|
||||
},
|
||||
"releaseDate": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 10
|
||||
},
|
||||
"song": [
|
||||
{
|
||||
"id": "1",
|
||||
|
@ -5,6 +5,7 @@
|
||||
<discTitles disc="1" title="disc 1"></discTitles>
|
||||
<discTitles disc="2" title="disc 2"></discTitles>
|
||||
<originalReleaseDate year="1994" month="2" day="4"></originalReleaseDate>
|
||||
<releaseDate year="2000" month="5" day="10"></releaseDate>
|
||||
<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>
|
||||
|
@ -13,6 +13,7 @@
|
||||
"isCompilation": false,
|
||||
"sortName": "",
|
||||
"discTitles": [],
|
||||
"originalReleaseDate": {}
|
||||
"originalReleaseDate": {},
|
||||
"releaseDate": {}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<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="" isCompilation="false" sortName="">
|
||||
<originalReleaseDate></originalReleaseDate>
|
||||
<releaseDate></releaseDate>
|
||||
</album>
|
||||
</subsonic-response>
|
||||
|
@ -232,6 +232,7 @@ type AlbumID3 struct {
|
||||
SortName string `xml:"sortName,attr" json:"sortName"`
|
||||
DiscTitles DiscTitles `xml:"discTitles" json:"discTitles"`
|
||||
OriginalReleaseDate ItemDate `xml:"originalReleaseDate" json:"originalReleaseDate"`
|
||||
ReleaseDate ItemDate `xml:"releaseDate" json:"releaseDate"`
|
||||
}
|
||||
|
||||
type ArtistWithAlbumsID3 struct {
|
||||
|
@ -178,6 +178,7 @@ var _ = Describe("Responses", func() {
|
||||
MusicBrainzId: "1234", IsCompilation: true, SortName: "sorted album",
|
||||
DiscTitles: DiscTitles{{Disc: 1, Title: "disc 1"}, {Disc: 2, Title: "disc 2"}},
|
||||
OriginalReleaseDate: ItemDate{Year: 1994, Month: 2, Day: 4},
|
||||
ReleaseDate: ItemDate{Year: 2000, Month: 5, Day: 10},
|
||||
}
|
||||
t := time.Date(2016, 03, 2, 20, 30, 0, 0, time.UTC)
|
||||
songs := []Child{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user