From 66ddc0bf22473b9cd90f98c92f9fa6d612bcc1d3 Mon Sep 17 00:00:00 2001 From: wqzz123 Date: Wed, 13 Apr 2022 16:15:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=87=E6=BB=A4x264,x265=E5=90=8E?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- number_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number_parser.py b/number_parser.py index 3751cc0..95b7b51 100755 --- a/number_parser.py +++ b/number_parser.py @@ -7,7 +7,7 @@ import typing G_spat = re.compile( "^\w+\.(cc|com|net|me|club|jp|tv|xyz|biz|wiki|info|tw|us|de)@|^22-sht\.me|" "^(fhd|hd|sd|1080p|720p|4K)(-|_)|" - "(-|_)(fhd|hd|sd|1080p|720p|4K|uncensored|leak)", + "(-|_)(fhd|hd|sd|1080p|720p|4K|x264|x265|uncensored|leak)", re.IGNORECASE) From 384015e648bd5d134e75b4e947bcaee27abb9218 Mon Sep 17 00:00:00 2001 From: wqzz123 Date: Wed, 13 Apr 2022 16:17:53 +0800 Subject: [PATCH 2/4] =?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' # 中文字幕影片后缀 From 4ad24deb9cb0ce4636cb15868a886f462f75905a Mon Sep 17 00:00:00 2001 From: wqzz123 Date: Wed, 13 Apr 2022 16:25:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E5=AD=97=E5=B9=95?= =?UTF-8?q?=E5=92=8C=E8=A7=86=E9=A2=91=E5=90=8D=E7=A7=B0=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=89=8D=E6=8B=B7=E8=B4=9D=E5=AD=97=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core.py b/core.py index 9a51305..f19383a 100644 --- a/core.py +++ b/core.py @@ -526,6 +526,8 @@ def paste_file_to_folder(filepath, path, multi_part, number, part, leak_word, c_ if subfile.is_file() and subfile.suffix.lower() in sub_res: if multi_part and part.lower() not in subfile.name.lower(): continue + if filepath_obj.stem.split('.')[0].lower() != subfile.stem.split('.')[0].lower(): + continue sub_targetpath = Path(path) / f"{number}{leak_word}{c_word}{hack_word}{''.join(subfile.suffixes)}" if link_mode not in (1, 2): shutil.move(str(subfile), str(sub_targetpath)) From fee5c4a54f8243db8fa49dd38bb086e264f0f313 Mon Sep 17 00:00:00 2001 From: wqzz123 Date: Wed, 13 Apr 2022 17:09:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?uncensored=E5=BF=BD=E7=95=A5=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index f19383a..a2e7b3d 100644 --- a/core.py +++ b/core.py @@ -637,7 +637,7 @@ def core_main_no_net_op(movie_path, number): cn_sub = '1' c_word = '-C' # 中文字幕影片后缀 uncensored = 1 if is_uncensored(number) else 0 - if '流出' in movie_path or 'uncensored' in movie_path: + if '流出' in movie_path or 'uncensored' in movie_path.lower(): leak_word = '-流出' # 流出影片后缀 leak = 1 @@ -714,7 +714,7 @@ def core_main(movie_path, number_th, oCC): if type(unce) is bool: uncensored = 1 if unce else 0 - if '流出' in movie_path or 'uncensored' in movie_path: + if '流出' in movie_path or 'uncensored' in movie_path.lower(): liuchu = '流出' leak = 1 leak_word = '-流出' # 流出影片后缀