优化字幕检测

This commit is contained in:
lededev
2022-04-10 03:12:03 +08:00
parent 109cc3717b
commit 3e3ff3cfb3
2 changed files with 7 additions and 6 deletions

View File

@@ -521,7 +521,7 @@ def paste_file_to_folder(filepath, path, multi_part, number, part, leak_word, c_
except:
os.symlink(str(filepath_obj.resolve()), targetpath)
sub_res = [subext.lower() for subext in config.getInstance().sub_rule()]
sub_res = config.getInstance().sub_rule()
for subfile in filepath_obj.parent.glob('**/*'):
if subfile.is_file() and subfile.suffix.lower() in sub_res:
if multi_part and part.lower() not in subfile.name.lower():
@@ -572,7 +572,7 @@ def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_wo
except:
os.symlink(str(filepath_obj.resolve()), targetpath)
sub_res = [subext.lower() for subext in config.getInstance().sub_rule()]
sub_res = config.getInstance().sub_rule()
for subfile in filepath_obj.parent.glob('**/*'):
if subfile.is_file() and subfile.suffix.lower() in sub_res:
if multi_part and part.lower() not in subfile.name.lower():