aboutsummaryrefslogtreecommitdiff
path: root/util/bind_config.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-05-20 18:53:38 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-05-20 18:53:38 +0530
commitc27319552d138bf6f853c8d9cc7eb2af24c27136 (patch)
tree196bce9ebdf8f008b9fe2343b9c13d47eb9c4543 /util/bind_config.go
parent775b8a4a1c8b73a38ecc7e75495361a6e9d74be1 (diff)
made 'nsfw' in config file global
Diffstat (limited to 'util/bind_config.go')
-rw-r--r--util/bind_config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/bind_config.go b/util/bind_config.go
index ece5c2e..8a62877 100644
--- a/util/bind_config.go
+++ b/util/bind_config.go
@@ -1,6 +1,6 @@
/*
macli - Unofficial CLI-Based MyAnimeList Client
-Copyright © 2022 Vidhu Kant Sharma <vidhukant@vidhukant.xyz>
+Copyright © 2022-2024 Vidhu Kant Sharma <vidhukant@vidhukant.xyz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -82,7 +82,7 @@ func BindSearchConfig(flags *pflag.FlagSet) (SearchConfig, error) {
conf.SearchNSFW, err = flags.GetBool("search-nsfw")
if err != nil {return conf, err}
} else {
- conf.SearchNSFW = viper.GetBool("searching.search_nsfw")
+ conf.SearchNSFW = viper.GetBool("global.nsfw")
}
return conf, nil
@@ -113,7 +113,7 @@ func BindListConfig(flags *pflag.FlagSet) (ListConfig, error) {
conf.IncludeNSFW, err = flags.GetBool("include-nsfw")
if err != nil {return conf, err}
} else {
- conf.IncludeNSFW = viper.GetBool("lists.include_nsfw_results")
+ conf.IncludeNSFW = viper.GetBool("global.nsfw")
}
return conf, nil