From dc551de957e07d42baa494ced896fb1f961ff3ae Mon Sep 17 00:00:00 2001 From: SharpX2016 Date: Wed, 28 Apr 2021 10:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20core.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复字幕文件无法自动移动 --- core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core.py b/core.py index 3c97ed2..57a4455 100755 --- a/core.py +++ b/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() 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