重命名格式支持S0重命名为Specials,SPs

This commit is contained in:
zhanglijun
2024-11-23 20:15:39 +08:00
parent 24b58dc002
commit b9c2b9a044
2 changed files with 7 additions and 0 deletions

View File

@@ -489,6 +489,9 @@ class MediaChain(ChainBase, metaclass=Singleton):
if init_folder:
# 识别文件夹名称
season_meta = MetaInfo(filepath.name)
# 当前文件夹为Specials或者SPs时设置为S0
if filepath.name in settings.RENAME_FORMAT_S0_NAMES:
season_meta.begin_season = 0
if season_meta.begin_season is not None:
# 是否已存在
nfo_path = filepath / "season.nfo"

View File

@@ -232,6 +232,10 @@ class ConfigModel(BaseModel):
SECURITY_IMAGE_SUFFIXES: List[str] = Field(
default_factory=lambda: [".jpg", ".jpeg", ".png", ".webp", ".gif", ".svg"]
)
# 重命名时支持的S0别名
RENAME_FORMAT_S0_NAMES: List[str] = Field(
default_factory=lambda: ["Specials", "SPs"]
)
class Settings(BaseSettings, ConfigModel):