🚑 修复插件配置项显示 (#1824)

This commit is contained in:
HibiKier 2025-01-07 16:41:42 +08:00 committed by GitHub
parent e124c1dbdb
commit 893611def0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,7 @@ def _handle_config(plugin: Plugin, exists_module: list[str]):
arg_parser=reg_config.arg_parser, arg_parser=reg_config.arg_parser,
_override=False, _override=False,
) )
exists_module.append(f"{module}:{reg_config.key}") exists_module.append(f"{module}:{reg_config.key}".lower())
def _generate_simple_config(exists_module: list[str]): def _generate_simple_config(exists_module: list[str]):
@ -71,7 +71,7 @@ def _generate_simple_config(exists_module: list[str]):
try: try:
if _data.get(module) and k in _data[module].keys(): if _data.get(module) and k in _data[module].keys():
Config.set_config(module, k, _data[module][k]) Config.set_config(module, k, _data[module][k])
if f"{module}:{k}" in exists_module: if f"{module}:{k}".lower() in exists_module:
_tmp_data[module][k] = Config.get_config(module, k) _tmp_data[module][k] = Config.get_config(module, k)
except AttributeError as e: except AttributeError as e:
raise AttributeError(f"{e}\n可能为config.yaml配置文件填写不规范") from e raise AttributeError(f"{e}\n可能为config.yaml配置文件填写不规范") from e