Check for Last.FM and Spotify configuration at startup
This commit is contained in:
@@ -93,3 +93,13 @@ func checkFfmpegInstallation() {
|
|||||||
conf.Server.Scanner.Extractor = "taglib"
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ func New(scanner *scanner.Scanner, ds model.DataStore) *Server {
|
|||||||
a.initRoutes()
|
a.initRoutes()
|
||||||
a.initScanner()
|
a.initScanner()
|
||||||
checkFfmpegInstallation()
|
checkFfmpegInstallation()
|
||||||
|
checkExternalCredentials()
|
||||||
return a
|
return a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user