fix(server): add disc number to fake path.

Also revert "feat(server): enable "Report Real Path" by default"

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2024-12-02 09:35:39 -05:00
parent 2b0bfbd75a
commit 627417dae3
3 changed files with 20 additions and 8 deletions
+9 -2
View File
@@ -27,11 +27,18 @@ var _ = Describe("helpers", func() {
Expect(fakePath(mf)).To(Equal("Brock Berrigan/Point Pleasant/04 - Split Decision.flac"))
})
})
When("TrackNumber and DiscNumber are available", func() {
It("adds the trackNumber to the path", func() {
mf.TrackNumber = 4
mf.DiscNumber = 1
Expect(fakePath(mf)).To(Equal("Brock Berrigan/Point Pleasant/01-04 - Split Decision.flac"))
})
})
})
Describe("mapSlashToDash", func() {
Describe("sanitizeSlashes", func() {
It("maps / to _", func() {
Expect(mapSlashToDash("AC/DC")).To(Equal("AC_DC"))
Expect(sanitizeSlashes("AC/DC")).To(Equal("AC_DC"))
})
})