From 6dc21d05956cb07077e9c7d55151861d86e95085 Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 21 Oct 2020 17:10:06 -0400 Subject: [PATCH] Check for Last.FM and Spotify configuration at startup --- server/initial_setup.go | 10 ++++++++++ server/server.go | 1 + 2 files changed, 11 insertions(+) diff --git a/server/initial_setup.go b/server/initial_setup.go index 6ac779f41..7fb729988 100644 --- a/server/initial_setup.go +++ b/server/initial_setup.go @@ -93,3 +93,13 @@ func checkFfmpegInstallation() { conf.Server.Scanner.Extractor = "taglib" } } + +func checkExternalCredentials() { + if conf.Server.LastFM.ApiKey == "" || conf.Server.LastFM.Secret == "" { + log.Info("Last.FM integration not available: missing ApiKey/Secret") + } + + if conf.Server.Spotify.ID == "" || conf.Server.Spotify.Secret == "" { + log.Info("Spotify integration is not enabled: artist images will not be available") + } +} diff --git a/server/server.go b/server/server.go index f0f78d3ac..a5869dc60 100644 --- a/server/server.go +++ b/server/server.go @@ -33,6 +33,7 @@ func New(scanner *scanner.Scanner, ds model.DataStore) *Server { a.initRoutes() a.initScanner() checkFfmpegInstallation() + checkExternalCredentials() return a }