Add initial last.fm client implementation

This commit is contained in:
Deluan
2020-10-17 23:59:09 -04:00
committed by Deluan Quintão
parent 61d0bd4729
commit eb74dad7cd
7 changed files with 256 additions and 0 deletions
+8
View File
@@ -41,6 +41,7 @@ type configOptions struct {
AuthWindowLength time.Duration
Scanner scannerOptions
LastFM lastfmOptions
// DevFlags. These are used to enable/disable debugging and incomplete features
DevLogSourceLine bool
@@ -51,6 +52,12 @@ type scannerOptions struct {
Extractor string
}
type lastfmOptions struct {
ApiKey string
Secret string
Language string
}
var Server = &configOptions{}
func LoadFromFile(confFile string) {
@@ -107,6 +114,7 @@ func init() {
viper.SetDefault("authwindowlength", 20*time.Second)
viper.SetDefault("scanner.extractor", "taglib")
viper.SetDefault("lastfm.language", "en")
// DevFlags. These are used to enable/disable debugging and incomplete features
viper.SetDefault("devlogsourceline", false)