From c27319552d138bf6f853c8d9cc7eb2af24c27136 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 20 May 2024 18:53:38 +0530 Subject: made 'nsfw' in config file global --- util/bind_config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/bind_config.go') 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 +Copyright © 2022-2024 Vidhu Kant Sharma 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 -- cgit v1.2.3