mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 16:19:48 +08:00
- 新增自定义域名
- 增加连接报错域名提示 #195 - 修复 Dev-debug 开启的错误 #192 - 重做重命名逻辑,支持合集重命名以及文件夹内重命名,支持字幕重命名。 - Fix pytest
This commit is contained in:
@@ -52,10 +52,21 @@ def env_to_config() -> Config:
|
||||
|
||||
if os.path.isdir("config") and VERSION == "DEV_VERSION":
|
||||
CONFIG_PATH = "config/config_dev.json"
|
||||
settings = load_config_from_file(CONFIG_PATH)
|
||||
print(dict(settings))
|
||||
if os.path.isfile(CONFIG_PATH):
|
||||
settings = load_config_from_file(CONFIG_PATH)
|
||||
else:
|
||||
settings = env_to_config()
|
||||
save_config_to_file(settings, CONFIG_PATH)
|
||||
elif os.path.isdir("config") and VERSION != "DEV_VERSION":
|
||||
CONFIG_PATH = "config/config.json"
|
||||
if os.path.isfile(CONFIG_PATH):
|
||||
settings = load_config_from_file(CONFIG_PATH)
|
||||
else:
|
||||
settings = env_to_config()
|
||||
save_config_to_file(settings, CONFIG_PATH)
|
||||
else:
|
||||
settings = Config()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,10 +60,10 @@ class Notification(BaseModel):
|
||||
|
||||
class Config(BaseModel):
|
||||
data_version: float = Field(4.0, description="Data version")
|
||||
program: Program
|
||||
downloader: Downloader
|
||||
rss_parser: RSSParser
|
||||
bangumi_manage: BangumiManage
|
||||
debug: Debug
|
||||
proxy: Proxy
|
||||
notification: Notification
|
||||
program: Program = Program()
|
||||
downloader: Downloader = Downloader()
|
||||
rss_parser: RSSParser = RSSParser()
|
||||
bangumi_manage: BangumiManage = BangumiManage()
|
||||
debug: Debug = Debug()
|
||||
proxy: Proxy = Proxy()
|
||||
notification: Notification = Notification()
|
||||
|
||||
Reference in New Issue
Block a user