From 384015e648bd5d134e75b4e947bcaee27abb9218 Mon Sep 17 00:00:00 2001 From: wqzz123 Date: Wed, 13 Apr 2022 16:17:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=5FC=20=5FCD=E5=90=8E?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core.py b/core.py index 6767996..9a51305 100644 --- a/core.py +++ b/core.py @@ -628,9 +628,9 @@ def core_main_no_net_op(movie_path, number): imagecut = 1 path = str(Path(movie_path).parent) - if re.search('-CD\d+', movie_path, re.IGNORECASE): - part = re.findall('-CD\d+', movie_path, re.IGNORECASE)[0].upper() - if re.search(r'-C(\.\w+$|-\w+)|\d+ch(\.\w+$|-\w+)', movie_path, + if re.search('[-_]CD\d+', movie_path, re.IGNORECASE): + part = re.findall('[-_]CD\d+', movie_path, re.IGNORECASE)[0].upper() + if re.search(r'[-_]C(\.\w+$|-\w+)|\d+ch(\.\w+$|-\w+)', movie_path, re.I) or '中文' in movie_path or '字幕' in movie_path: cn_sub = '1' c_word = '-C' # 中文字幕影片后缀 @@ -698,10 +698,10 @@ def core_main(movie_path, number_th, oCC): imagecut = json_data.get('imagecut') tag = json_data.get('tag') # =======================================================================判断-C,-CD后缀 - if re.search('-CD\d+', movie_path, re.IGNORECASE): + if re.search('[-_]CD\d+', movie_path, re.IGNORECASE): multi_part = 1 - part = re.findall('-CD\d+', movie_path, re.IGNORECASE)[0].upper() - if re.search(r'-C(\.\w+$|-\w+)|\d+ch(\.\w+$|-\w+)', movie_path, + part = re.findall('[-_]CD\d+', movie_path, re.IGNORECASE)[0].upper() + if re.search(r'[-_]C(\.\w+$|-\w+)|\d+ch(\.\w+$|-\w+)', movie_path, re.I) or '中文' in movie_path or '字幕' in movie_path: cn_sub = '1' c_word = '-C' # 中文字幕影片后缀