diff --git a/server/serve_index.go b/server/serve_index.go index 4d48f5424..f0b7c7560 100644 --- a/server/serve_index.go +++ b/server/serve_index.go @@ -61,7 +61,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl "enableSharing": conf.Server.EnableSharing, "defaultDownloadableShare": conf.Server.DefaultDownloadableShare, "devSidebarPlaylists": conf.Server.DevSidebarPlaylists, - "lastFMEnabled": conf.Server.LastFM.Enabled && conf.Server.LastFM.ApiKey != "" && conf.Server.LastFM.Secret != "", + "lastFMEnabled": conf.Server.LastFM.Enabled, "devShowArtistPage": conf.Server.DevShowArtistPage, "listenBrainzEnabled": conf.Server.ListenBrainz.Enabled, "enableExternalServices": conf.Server.EnableExternalServices, diff --git a/server/serve_index_test.go b/server/serve_index_test.go index 701049d91..0f02153fd 100644 --- a/server/serve_index_test.go +++ b/server/serve_index_test.go @@ -283,8 +283,6 @@ var _ = Describe("serveIndex", func() { It("sets the lastFMEnabled", func() { conf.Server.LastFM.Enabled = true - conf.Server.LastFM.ApiKey = "123" - conf.Server.LastFM.Secret = "456" r := httptest.NewRequest("GET", "/index.html", nil) w := httptest.NewRecorder() diff --git a/ui/src/personal/Personal.js b/ui/src/personal/Personal.js index 84f9b63e6..0b571c0f0 100644 --- a/ui/src/personal/Personal.js +++ b/ui/src/personal/Personal.js @@ -27,7 +27,9 @@ const Personal = () => { {config.enableReplayGain && } - {config.lastFMEnabled && } + {config.lastFMEnabled && localStorage.getItem('lastfm-apikey') && ( + + )} {config.listenBrainzEnabled && }