mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 11:17:19 +03:00
Remove LastFM shared key
This commit is contained in:
parent
546aa26a0a
commit
78d557c185
@ -335,8 +335,8 @@ func init() {
|
|||||||
viper.SetDefault("agents", "lastfm,spotify")
|
viper.SetDefault("agents", "lastfm,spotify")
|
||||||
viper.SetDefault("lastfm.enabled", true)
|
viper.SetDefault("lastfm.enabled", true)
|
||||||
viper.SetDefault("lastfm.language", "en")
|
viper.SetDefault("lastfm.language", "en")
|
||||||
viper.SetDefault("lastfm.apikey", consts.LastFMAPIKey)
|
viper.SetDefault("lastfm.apikey", "")
|
||||||
viper.SetDefault("lastfm.secret", consts.LastFMAPISecret)
|
viper.SetDefault("lastfm.secret", "")
|
||||||
viper.SetDefault("spotify.id", "")
|
viper.SetDefault("spotify.id", "")
|
||||||
viper.SetDefault("spotify.secret", "")
|
viper.SetDefault("spotify.secret", "")
|
||||||
viper.SetDefault("listenbrainz.enabled", true)
|
viper.SetDefault("listenbrainz.enabled", true)
|
||||||
|
@ -81,12 +81,6 @@ const (
|
|||||||
DefaultCacheCleanUpInterval = 10 * time.Minute
|
DefaultCacheCleanUpInterval = 10 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
// Shared secrets (only add here "secrets" that can be public)
|
|
||||||
const (
|
|
||||||
LastFMAPIKey = "9b94a5515ea66b2da3ec03c12300327e" // nolint:gosec
|
|
||||||
LastFMAPISecret = "74cb6557cec7171d921af5d7d887c587" // nolint:gosec
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
DefaultDownsamplingFormat = "opus"
|
DefaultDownsamplingFormat = "opus"
|
||||||
DefaultTranscodings = []map[string]interface{}{
|
DefaultTranscodings = []map[string]interface{}{
|
||||||
|
@ -311,12 +311,14 @@ func (l *lastfmAgent) IsAuthorized(ctx context.Context, userId string) bool {
|
|||||||
func init() {
|
func init() {
|
||||||
conf.AddHook(func() {
|
conf.AddHook(func() {
|
||||||
if conf.Server.LastFM.Enabled {
|
if conf.Server.LastFM.Enabled {
|
||||||
agents.Register(lastFMAgentName, func(ds model.DataStore) agents.Interface {
|
if conf.Server.LastFM.ApiKey != "" && conf.Server.LastFM.Secret != "" {
|
||||||
return lastFMConstructor(ds)
|
agents.Register(lastFMAgentName, func(ds model.DataStore) agents.Interface {
|
||||||
})
|
return lastFMConstructor(ds)
|
||||||
scrobbler.Register(lastFMAgentName, func(ds model.DataStore) scrobbler.Scrobbler {
|
})
|
||||||
return lastFMConstructor(ds)
|
scrobbler.Register(lastFMAgentName, func(ds model.DataStore) scrobbler.Scrobbler {
|
||||||
})
|
return lastFMConstructor(ds)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user