cn_sub check

This commit is contained in:
yoshiko2
2022-05-20 20:05:32 +08:00
parent 417ff137b1
commit 964518572c
2 changed files with 2 additions and 1 deletions

View File

@@ -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: # 普通提取番号 主要处理包含减号-和_的番号