diff options
Diffstat (limited to 'mal')
-rw-r--r-- | mal/mal.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -61,6 +61,7 @@ func Init() { confSearchLength := viper.Get("searching.search_length") confSearchOffset := viper.Get("searching.search_offset") confSearchNsfw := viper.Get("searching.search_nsfw") + confSecret := viper.Get("auth.token") // if SearchLength is the default value just use the one in config file if any if confSearchLength != nil && SearchLength == 10 { @@ -75,6 +76,12 @@ func Init() { SearchNSFW = confSearchNsfw.(bool) } + /* the secret stored in the config file + * takes precedence on the system keyring */ + if confSecret != nil && confSecret != "" { + Secret = confSecret.(string) + } + // initialise MAL2Go Client(s) animeClient.AuthToken = tk mangaClient.AuthToken = tk |