Enable Last.fm scrobbling by default (still requires user's authorization)

This commit is contained in:
Deluan 2021-06-25 22:37:58 -04:00
parent 92634a7408
commit 26bcf0b877
3 changed files with 6 additions and 3 deletions

View File

@ -228,7 +228,7 @@ func init() {
viper.SetDefault("devFastAccessCoverArt", false)
viper.SetDefault("devactivitypanel", true)
viper.SetDefault("devenableshare", false)
viper.SetDefault("devenablescrobble", false)
viper.SetDefault("devenablescrobble", true)
}
func InitConfig(cfgFile string) {

View File

@ -207,7 +207,7 @@ var _ = Describe("serveIndex", func() {
serveIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("devEnableScrobble", false))
Expect(config).To(HaveKeyWithValue("devEnableScrobble", true))
})
It("sets the lastFMApiKey", func() {

View File

@ -11,6 +11,7 @@ import {
useTranslate,
} from 'react-admin'
import { Title } from '../common'
import config from '../config'
const PlayerTitle = ({ record }) => {
const translate = useTranslate()
@ -47,7 +48,9 @@ const PlayerEdit = (props) => (
]}
/>
<BooleanInput source="reportRealPath" fullWidth />
<BooleanInput source="scrobbleEnabled" fullWidth />
{config.devEnableScrobble && (
<BooleanInput source="scrobbleEnabled" fullWidth />
)}
<TextField source="client" />
<TextField source="userName" />
</SimpleForm>