ReplayGain support + audio normalization (web player) (#1988)
* ReplayGain support - extract ReplayGain tags from files, expose via native api - use metadata to normalize audio in web player * make pre-push happy * remove unnecessary prints * remove another unnecessary print * add tooltips, see metadata * address comments, use settings instead * remove console.log * use better language for gain modes
This commit is contained in:
@@ -52,6 +52,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
|
||||
"lastFMApiKey": conf.Server.LastFM.ApiKey,
|
||||
"devShowArtistPage": conf.Server.DevShowArtistPage,
|
||||
"listenBrainzEnabled": conf.Server.ListenBrainz.Enabled,
|
||||
"enableReplayGain": conf.Server.EnableReplayGain,
|
||||
}
|
||||
if strings.HasPrefix(conf.Server.UILoginBackgroundURL, "/") {
|
||||
appConfig["loginBackgroundURL"] = path.Join(conf.Server.BaseURL, conf.Server.UILoginBackgroundURL)
|
||||
|
||||
@@ -289,6 +289,17 @@ var _ = Describe("serveIndex", func() {
|
||||
Expect(config).To(HaveKeyWithValue("listenBrainzEnabled", true))
|
||||
})
|
||||
|
||||
It("sets the enableReplayGain", func() {
|
||||
conf.Server.EnableReplayGain = true
|
||||
r := httptest.NewRequest("GET", "/index.html", nil)
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
serveIndex(ds, fs)(w, r)
|
||||
|
||||
config := extractAppConfig(w.Body.String())
|
||||
Expect(config).To(HaveKeyWithValue("enableReplayGain", true))
|
||||
})
|
||||
|
||||
Describe("loginBackgroundURL", func() {
|
||||
Context("empty BaseURL", func() {
|
||||
BeforeEach(func() {
|
||||
|
||||
Reference in New Issue
Block a user