Skip to content

Commit

Permalink
cn_sub check
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdctop committed May 20, 2022
1 parent 417ff13 commit 9645185
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def core_main_no_net_op(movie_path, number):
part = re.findall('[-_]CD\d+', movie_path, re.IGNORECASE)[0].upper()
multi = True
if re.search(r'[-_]C(\.\w+$|-\w+)|\d+ch(\.\w+$|-\w+)', movie_path,
re.I) or '中文' in movie_path or '字幕' in movie_path:
re.I) or '中文' in movie_path or '字幕' in movie_path or ".chs" in movie_path or '.cht' in movie_path:
cn_sub = '1'
c_word = '-C' # 中文字幕影片后缀
uncensored = 1 if is_uncensored(number) else 0
Expand Down
1 change: 1 addition & 0 deletions number_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def get_number(debug: bool, file_path: str) -> str:
elif '字幕组' in filepath or 'SUB' in filepath.upper():
filepath = G_spat.sub("", filepath)
filepath = re.sub("\[.*?\]","",filepath)
filepath = filepath.replace(".chs", "").replace(".cht", "")
file_number = str(re.findall(r'(.+?)\.', filepath)).strip(" [']")
return file_number
elif '-' in filepath or '_' in filepath: # 普通提取番号 主要处理包含减号-和_的番号
Expand Down

0 comments on commit 9645185

Please sign in to comment.