Implement originalReleaseDate in OpenSubsonic responses. (#2733)

See https://github.com/opensubsonic/open-subsonic-api/pull/80
This commit is contained in:
Deluan Quintão
2023-12-22 21:03:55 -05:00
committed by GitHub
parent 3f349b1b58
commit 15e1394fa3
8 changed files with 58 additions and 10 deletions
+11
View File
@@ -57,4 +57,15 @@ var _ = Describe("helpers", func() {
Expect(buildDiscSubtitles(context.Background(), album)).To(Equal(expected))
})
})
DescribeTable("toItemDate",
func(date string, expected responses.ItemDate) {
Expect(toItemDate(date)).To(Equal(expected))
},
Entry("1994-02-04", "1994-02-04", responses.ItemDate{Year: 1994, Month: 2, Day: 4}),
Entry("1994-02", "1994-02", responses.ItemDate{Year: 1994, Month: 2}),
Entry("1994", "1994", responses.ItemDate{Year: 1994}),
Entry("19940201", "", responses.ItemDate{}),
Entry("", "", responses.ItemDate{}),
)
})