Skip to content

🎧 Your Personal Streaming Service

Better logging for agents configuration

Deluan20cdd38fc4dd
diff --git a/conf/configuration.go b/conf/configuration.go
index c4f9ba61c..d6e49262e 100644
--- a/conf/configuration.go
+++ b/conf/configuration.go
@@ -158,6 +158,7 @@ func disableExternalServices() {
Server.LastFM.Enabled = false
Server.Spotify.ID = ""
Server.ListenBrainz.Enabled = false
+ Server.Agents = ""
if Server.UILoginBackgroundURL == consts.DefaultUILoginBackgroundURL {
Server.UILoginBackgroundURL = consts.DefaultUILoginBackgroundURLOffline
}
diff --git a/core/agents/agents.go b/core/agents/agents.go
index 78ed24ca5..edf168e68 100644
--- a/core/agents/agents.go
+++ b/core/agents/agents.go
@@ -18,7 +18,10 @@ type Agents struct {
}
func New(ds model.DataStore) *Agents {
- order := strings.Split(conf.Server.Agents, ",")
+ var order []string
+ if conf.Server.Agents != "" {
+ order = strings.Split(conf.Server.Agents, ",")
+ }
order = append(order, PlaceholderAgentName)
var res []Interface
for _, name := range order {
diff --git a/server/initial_setup.go b/server/initial_setup.go
index 0832099fd..3718c2556 100644
--- a/server/initial_setup.go
+++ b/server/initial_setup.go
@@ -90,15 +90,23 @@ func checkFfmpegInstallation() {
}
func checkExternalCredentials() {
- if !conf.Server.LastFM.Enabled {
- log.Info("Last.FM integration is DISABLED")
- } else {
- log.Debug("Last.FM integration is ENABLED")
- }
+ if conf.Server.EnableExternalServices {
+ if !conf.Server.LastFM.Enabled {
+ log.Info("Last.FM integration is DISABLED")
+ } else {
+ log.Debug("Last.FM integration is ENABLED")
+ }
- if conf.Server.Spotify.ID == "" || conf.Server.Spotify.Secret == "" {
- log.Info("Spotify integration is not enabled: missing ID/Secret")
- } else {
- log.Debug("Spotify integration is ENABLED")
+ if !conf.Server.ListenBrainz.Enabled {
+ log.Info("ListenBrainz integration is DISABLED")
+ } else {
+ log.Debug("ListenBrainz integration is ENABLED")
+ }
+
+ if conf.Server.Spotify.ID == "" || conf.Server.Spotify.Secret == "" {
+ log.Info("Spotify integration is not enabled: missing ID/Secret")
+ } else {
+ log.Debug("Spotify integration is ENABLED")
+ }
}
}