mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-24 10:31:09 +08:00
- 新增自定义域名
- 增加连接报错域名提示 #195 - 修复 Dev-debug 开启的错误 #192 - 重做重命名逻辑,支持合集重命名以及文件夹内重命名,支持字幕重命名。
This commit is contained in:
@@ -1 +1,2 @@
|
||||
from .bangumi import *
|
||||
from .config import Config
|
||||
|
||||
69
src/module/models/config.py
Normal file
69
src/module/models/config.py
Normal file
@@ -0,0 +1,69 @@
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
# Sub config
|
||||
|
||||
|
||||
class Program(BaseModel):
|
||||
sleep_time: int = Field(7200, description="Sleep time")
|
||||
rename_times: int = Field(20, description="Rename times in one loop")
|
||||
webui_port: int = Field(7892, description="WebUI port")
|
||||
|
||||
|
||||
class Downloader(BaseModel):
|
||||
type: str = Field("qbittorrent", description="Downloader type")
|
||||
host: str = Field("172.17.0.1:8080", description="Downloader host")
|
||||
username: str = Field("admin", description="Downloader username")
|
||||
password: str = Field("adminadmin", description="Downloader password")
|
||||
path: str = Field("/downloads/Bangumi", description="Downloader path")
|
||||
ssl: bool = Field(False, description="Downloader ssl")
|
||||
|
||||
class RSSParser(BaseModel):
|
||||
enable: bool = Field(True, description="Enable RSS parser")
|
||||
type: str = Field("mikan", description="RSS parser type")
|
||||
token: str = Field("token", description="RSS parser token")
|
||||
custom_url: str = Field("mikanani.me", description="Custom RSS host url")
|
||||
enable_tmdb: bool = Field(False, description="Enable TMDB")
|
||||
filter: list[str] = Field(["720", r"\d+-\d"], description="Filter")
|
||||
language: str = "zh"
|
||||
|
||||
|
||||
class BangumiManage(BaseModel):
|
||||
enable: bool = Field(True, description="Enable bangumi manage")
|
||||
eps_complete: bool = Field(False, description="Enable eps complete")
|
||||
rename_method: str = Field("pn", description="Rename method")
|
||||
group_tag: bool = Field(False, description="Enable group tag")
|
||||
remove_bad_torrent: bool = Field(False, description="Remove bad torrent")
|
||||
|
||||
|
||||
class Debug(BaseModel):
|
||||
enable: bool = Field(False, description="Enable debug")
|
||||
level: str = Field("debug", description="Debug level")
|
||||
file: str = Field("debug.log", description="Debug file")
|
||||
dev_debug: bool = Field(False, description="Enable dev debug")
|
||||
|
||||
|
||||
class Proxy(BaseModel):
|
||||
enable: bool = Field(False, description="Enable proxy")
|
||||
type: str = Field("http", description="Proxy type")
|
||||
host: str = Field("", description="Proxy host")
|
||||
port: int = Field(0, description="Proxy port")
|
||||
username: str = Field("", description="Proxy username")
|
||||
password: str = Field("", description="Proxy password")
|
||||
|
||||
|
||||
class Notification(BaseModel):
|
||||
enable: bool = Field(False, description="Enable notification")
|
||||
type: str = Field("telegram", description="Notification type")
|
||||
token: str = Field("", description="Notification token")
|
||||
chat_id: str = Field("", description="Notification chat id")
|
||||
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user