更新 core.py
修复字幕文件无法自动移动
This commit is contained in:
8
core.py
8
core.py
@@ -612,8 +612,8 @@ def paste_file_to_folder(filepath, path, number, leak_word, c_word, conf: config
|
|||||||
sub_res = conf.sub_rule()
|
sub_res = conf.sub_rule()
|
||||||
|
|
||||||
for subname in sub_res:
|
for subname in sub_res:
|
||||||
if os.path.exists(number + leak_word + c_word + subname): # 字幕移动
|
if os.path.exists(filepath.replace(houzhui, subname)): # 字幕移动
|
||||||
os.rename(number + leak_word + c_word + subname, path + '/' + number + leak_word + c_word + subname)
|
os.rename(filepath.replace(houzhui, subname), path + '/' + number + leak_word + c_word + subname)
|
||||||
print('[+]Sub moved!')
|
print('[+]Sub moved!')
|
||||||
return True
|
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()
|
sub_res = conf.sub_rule()
|
||||||
for subname in sub_res:
|
for subname in sub_res:
|
||||||
if os.path.exists(os.getcwd() + '/' + number + leak_word + c_word + subname): # 字幕移动
|
if os.path.exists(filepath.replace(houzhui, subname)): # 字幕移动
|
||||||
os.rename(os.getcwd() + '/' + number + leak_word + c_word + subname, path + '/' + number + leak_word + c_word + subname)
|
os.rename(filepath.replace(houzhui, subname), path + '/' + number + leak_word + c_word + subname)
|
||||||
print('[+]Sub moved!')
|
print('[+]Sub moved!')
|
||||||
print('[!]Success')
|
print('[!]Success')
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user