fix: implement fallback to DefaultDownsamplingFormat for unknown formats

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2026-03-11 09:46:06 -04:00
parent d8bc41fbb1
commit 5ecbe31a06
3 changed files with 154 additions and 3 deletions
+2 -2
View File
@@ -89,11 +89,11 @@ var _ = Describe("Media Retrieval Endpoints", Ordered, func() {
Expect(streamerSpy.LastRequest.BitRate).To(Equal(128))
})
It("falls back to raw for unknown format", func() {
It("falls back to default downsampling format for unknown format", func() {
w := doRawReq("stream", "id", trackID, "format", "xyz")
Expect(w.Code).To(Equal(http.StatusOK))
Expect(streamerSpy.LastRequest.Format).To(Equal("raw"))
Expect(streamerSpy.LastRequest.Format).To(Equal("opus"))
})
It("passes timeOffset through", func() {