Add DefaultUIVolume option. Closes #1679
This commit is contained in:
@@ -39,6 +39,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
|
||||
"enableStarRating": conf.Server.EnableStarRating,
|
||||
"defaultTheme": conf.Server.DefaultTheme,
|
||||
"defaultLanguage": conf.Server.DefaultLanguage,
|
||||
"defaultUIVolume": conf.Server.DefaultUIVolume,
|
||||
"enableCoverAnimation": conf.Server.EnableCoverAnimation,
|
||||
"gaTrackingId": conf.Server.GATrackingID,
|
||||
"losslessFormats": strings.ToUpper(strings.Join(consts.LosslessFormats, ",")),
|
||||
|
||||
@@ -170,6 +170,17 @@ var _ = Describe("serveIndex", func() {
|
||||
Expect(config).To(HaveKeyWithValue("defaultLanguage", "pt"))
|
||||
})
|
||||
|
||||
It("sets the defaultUIVolume", func() {
|
||||
conf.Server.DefaultUIVolume = 45
|
||||
r := httptest.NewRequest("GET", "/index.html", nil)
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
serveIndex(ds, fs)(w, r)
|
||||
|
||||
config := extractAppConfig(w.Body.String())
|
||||
Expect(config).To(HaveKeyWithValue("defaultUIVolume", float64(45)))
|
||||
})
|
||||
|
||||
It("sets the enableCoverAnimation", func() {
|
||||
conf.Server.EnableCoverAnimation = true
|
||||
r := httptest.NewRequest("GET", "/index.html", nil)
|
||||
|
||||
Reference in New Issue
Block a user