GetCoverArt returns placeholder if id is missing

This mimics Subsonic behaviour, even if it contradicts the API documentation, which states `id` is required

Fixes #1139
This commit is contained in:
Deluan
2021-05-29 11:37:00 -04:00
parent 7bbb09e546
commit 91a91f7e06
4 changed files with 26 additions and 6 deletions
+3 -2
View File
@@ -37,11 +37,12 @@ var _ = Describe("MediaRetrievalController", func() {
Expect(w.Body.String()).To(Equal(artwork.data))
})
It("should fail if missing id parameter", func() {
It("should return placeholder if id parameter is missing (mimicking Subsonic)", func() {
r := newGetRequest()
_, err := controller.GetCoverArt(w, r)
Expect(err).To(MatchError("required 'id' parameter is missing"))
Expect(err).To(BeNil())
Expect(w.Body.String()).To(Equal(artwork.data))
})
It("should fail when the file is not found", func() {