From 05564c8ffe4841265f4fab76a26df28414498524 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 6 Jun 2023 12:29:27 +0800 Subject: [PATCH] fix rename format --- app/core/config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/core/config.py b/app/core/config.py index ab426419..1ca37194 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -128,9 +128,14 @@ class Settings(BaseSettings): # 豆瓣用户ID,用于同步豆瓣数据,使用,分隔 DOUBAN_USER_IDS: str = "" # 电影重命名格式 - MOVIE_RENAME_FORMAT: str = "{{title}} ({{year}})/{{title}} ({{year}})-{{part}} - {{videoFormat}}{{fileExt}}" + MOVIE_RENAME_FORMAT: str = "{{title}}{% if year %} ({{year}}){% endif %}" \ + "/{{title}}{% if year %} ({{year}}){% endif %}{% if part %}-{{part}}{% endif %}{% if videoFormat %} - {{videoFormat}}{% endif %}" \ + "{{fileExt}}" # 电视剧重命名格式 - TV_RENAME_FORMAT: str = "{{title}} ({{year}})/Season {{season}}/{{title}} - {{season_episode}}-{{part}} - 第 {{episode}} 集{{fileExt}}" + TV_RENAME_FORMAT: str = "{{title}}{% if year %} ({{year}}){% endif %}" \ + "/Season {{season}}" \ + "/{{title}} - {{season_episode}}{% if part %}-{{part}}{% endif %}{% if episode %} - 第 {{episode}} 集{% endif %}" \ + "{{fileExt}}" @property def INNER_CONFIG_PATH(self):