Check for Last.FM and Spotify configuration at startup

This commit is contained in:
Deluan 2020-10-21 17:10:06 -04:00
parent 79710fbee0
commit 6dc21d0595
2 changed files with 11 additions and 0 deletions

View File

@ -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")
}
}

View File

@ -33,6 +33,7 @@ func New(scanner *scanner.Scanner, ds model.DataStore) *Server {
a.initRoutes()
a.initScanner()
checkFfmpegInstallation()
checkExternalCredentials()
return a
}