mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-16 07:08:48 +01:00
Disable Last.FM features based on LastFM.Enabled config option
This commit is contained in:
parent
289da56f64
commit
cfb113bd33
9 changed files with 9 additions and 20 deletions
|
|
@ -45,7 +45,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
|
|||
"devFastAccessCoverArt": conf.Server.DevFastAccessCoverArt,
|
||||
"enableUserEditing": conf.Server.EnableUserEditing,
|
||||
"devEnableShare": conf.Server.DevEnableShare,
|
||||
"devEnableScrobble": conf.Server.DevEnableScrobble,
|
||||
"lastFMEnabled": conf.Server.LastFM.Enabled,
|
||||
"lastFMApiKey": conf.Server.LastFM.ApiKey,
|
||||
}
|
||||
auth := handleLoginFromHeaders(ds, r)
|
||||
|
|
|
|||
|
|
@ -211,14 +211,14 @@ var _ = Describe("serveIndex", func() {
|
|||
Expect(config).To(HaveKeyWithValue("devEnableShare", false))
|
||||
})
|
||||
|
||||
It("sets the devEnableScrobble", func() {
|
||||
It("sets the lastFMEnabled", func() {
|
||||
r := httptest.NewRequest("GET", "/index.html", nil)
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
serveIndex(ds, fs)(w, r)
|
||||
|
||||
config := extractAppConfig(w.Body.String())
|
||||
Expect(config).To(HaveKeyWithValue("devEnableScrobble", true))
|
||||
Expect(config).To(HaveKeyWithValue("lastFMEnabled", true))
|
||||
})
|
||||
|
||||
It("sets the lastFMApiKey", func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue