diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.go index 4a50745e1..517416d5b 100644 --- a/server/subsonic/helpers.go +++ b/server/subsonic/helpers.go @@ -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 } 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 .JSON index b7ba2d1dd..24bb69c42 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 @@ -36,6 +36,11 @@ "month": 2, "day": 4 }, + "releaseDate": { + "year": 2000, + "month": 5, + "day": 10 + }, "song": [ { "id": "1", 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 .XML index fd37f83f9..a1aed3fb0 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 @@ -5,6 +5,7 @@ + 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 .JSON index 8a5b87f24..42f8a65f9 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 @@ -13,6 +13,7 @@ "isCompilation": false, "sortName": "", "discTitles": [], - "originalReleaseDate": {} + "originalReleaseDate": {}, + "releaseDate": {} } } 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 .XML index 2b748953a..54fbbeb84 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,5 +1,6 @@ + diff --git a/server/subsonic/responses/responses.go b/server/subsonic/responses/responses.go index d818eecc8..2416c74d8 100644 --- a/server/subsonic/responses/responses.go +++ b/server/subsonic/responses/responses.go @@ -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 { diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.go index a1c37a39c..e4e429c98 100644 --- a/server/subsonic/responses/responses_test.go +++ b/server/subsonic/responses/responses_test.go @@ -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{{