mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-17 09:50:42 +08:00
fix: 修复 Config.load_plugins 参数默认值为可变参数导致非初次调用时默认值无效的问题
This commit is contained in:
parent
dc3afeae1d
commit
9d2d796979
@ -69,6 +69,7 @@ def add_notify(text):
|
||||
|
||||
class Config:
|
||||
# 下载配置
|
||||
@staticmethod
|
||||
def download_file(url, save_path):
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
@ -79,6 +80,7 @@ class Config:
|
||||
return False
|
||||
|
||||
# 读取CK
|
||||
@staticmethod
|
||||
def get_cookies(cookie_val):
|
||||
if isinstance(cookie_val, list):
|
||||
return cookie_val
|
||||
@ -90,7 +92,11 @@ class Config:
|
||||
else:
|
||||
return False
|
||||
|
||||
def load_plugins(plugins_config={}, plugins_dir="plugins"):
|
||||
@staticmethod
|
||||
def load_plugins(plugins_config=None, plugins_dir="plugins"):
|
||||
if plugins_config is None:
|
||||
plugins_config = {}
|
||||
|
||||
PLUGIN_FLAGS = os.environ.get("PLUGIN_FLAGS", "").split(",")
|
||||
plugins_available = {}
|
||||
task_plugins_config = {}
|
||||
@ -129,6 +135,7 @@ class Config:
|
||||
print()
|
||||
return plugins_available, plugins_config, task_plugins_config
|
||||
|
||||
@staticmethod
|
||||
def breaking_change_update(config_data):
|
||||
if config_data.get("emby"):
|
||||
print("🔼 Update config v0.3.6.1 to 0.3.7")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user