更新 core.py

修复字幕文件无法自动移动
This commit is contained in:
SharpX2016
2021-04-28 10:36:09 +08:00
parent 07af676bd6
commit dc551de957

View File

@@ -612,8 +612,8 @@ def paste_file_to_folder(filepath, path, number, leak_word, c_word, conf: config
sub_res = conf.sub_rule()
for subname in sub_res:
if os.path.exists(number + leak_word + c_word + subname): # 字幕移动
os.rename(number + leak_word + c_word + subname, path + '/' + number + leak_word + c_word + subname)
if os.path.exists(filepath.replace(houzhui, subname)): # 字幕移动
os.rename(filepath.replace(houzhui, subname), path + '/' + number + leak_word + c_word + subname)
print('[+]Sub moved!')
return True
@@ -639,8 +639,8 @@ def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_wo
sub_res = conf.sub_rule()
for subname in sub_res:
if os.path.exists(os.getcwd() + '/' + number + leak_word + c_word + subname): # 字幕移动
os.rename(os.getcwd() + '/' + number + leak_word + c_word + subname, path + '/' + number + leak_word + c_word + subname)
if os.path.exists(filepath.replace(houzhui, subname)): # 字幕移动
os.rename(filepath.replace(houzhui, subname), path + '/' + number + leak_word + c_word + subname)
print('[+]Sub moved!')
print('[!]Success')
return True