mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-01 19:47:37 +03:00
Do not use lastFM api key and secret to determine if LastFM.Enabled should be set.
This commit is contained in:
parent
e535f7eb78
commit
1b77830eb4
3 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -27,7 +27,9 @@ const Personal = () => {
|
|||
<SelectDefaultView />
|
||||
{config.enableReplayGain && <ReplayGainToggle />}
|
||||
<NotificationsToggle />
|
||||
{config.lastFMEnabled && <LastfmScrobbleToggle />}
|
||||
{config.lastFMEnabled && localStorage.getItem('lastfm-apikey') && (
|
||||
<LastfmScrobbleToggle />
|
||||
)}
|
||||
{config.listenBrainzEnabled && <ListenBrainzScrobbleToggle />}
|
||||
</SimpleForm>
|
||||
</Card>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue