🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
New config to disable all external integrations. Closes #102
Deluan1823159b2535
diff --git a/conf/configuration.go b/conf/configuration.goindex 5ddec29f7..aa1b1a146 100644--- a/conf/configuration.go+++ b/conf/configuration.go@@ -29,6 +29,7 @@ type configOptions struct {UILoginBackgroundURL stringEnableTranscodingConfig boolEnableDownloads bool+ EnableExternalServices boolTranscodingCacheSize stringImageCacheSize stringAutoImportPlaylists bool@@ -138,12 +139,24 @@ func Load() {fmt.Println(prettyConf)}+ if !Server.EnableExternalServices {+ disableExternalServices()+ }+// Call init hooksfor _, hook := range hooks {hook()}}+func disableExternalServices() {+ log.Info("All external integrations are DISABLED!")+ Server.LastFM.Enabled = false+ Server.Spotify.ID = ""+ Server.UILoginBackgroundURL = consts.DefaultUILoginBackgroundURLOffline+ Server.DevListenBrainzEnabled = false+}+func validateScanSchedule() error {if Server.ScanInterval != -1 {log.Warn("ScanInterval is DEPRECATED. Please use ScanSchedule. See docs at https://navidrome.org/docs/usage/configuration-options/")@@ -195,6 +208,7 @@ func init() {viper.SetDefault("autoimportplaylists", true)viper.SetDefault("playlistspath", consts.DefaultPlaylistsPath)viper.SetDefault("enabledownloads", true)+ viper.SetDefault("enableexternalservices", true)// Config options only valid for file/env configurationviper.SetDefault("searchfullstring", false)diff --git a/consts/consts.go b/consts/consts.goindex 0471cf7f5..af7f74a6a 100644--- a/consts/consts.go+++ b/consts/consts.go@@ -35,6 +35,8 @@ const (// Login backgrounds from https://unsplash.com/collections/20072696/navidromeDefaultUILoginBackgroundURL = "https://source.unsplash.com/collection/20072696/1600x900"+ // In case external integrations are disabled+ DefaultUILoginBackgroundURLOffline = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAABGdBTUEAALGPC/xhBQAAAiJJREFUeF7t0IEAAAAAw6D5Ux/khVBhwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDDwMDDVlwABBWcSrQAAAABJRU5ErkJggg=="RequestThrottleBacklogLimit = 100RequestThrottleBacklogTimeout = time.Minute