From 1a9fd18f15cc025c8e1d228ed87587d3cdfef726 Mon Sep 17 00:00:00 2001 From: SharpX2016 Date: Thu, 29 Apr 2021 18:03:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E5=87=BA=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=BD=B1=E7=89=87=E6=96=87=E4=BB=B6=E5=90=8D=E6=9C=AA?= =?UTF-8?q?=E5=8A=A0=20=E2=80=98-=E6=B5=81=E5=87=BA=E2=80=99=20=E5=92=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0=E4=B8=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复流出类型影片文件名未加 ‘-流出’ 和其他文件名称不匹配的问题 --- core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core.py b/core.py index 564c1a6..a4ffefe 100755 --- a/core.py +++ b/core.py @@ -620,10 +620,10 @@ def paste_file_to_folder(filepath, path, number, leak_word, c_word, conf: config houzhui = os.path.splitext(filepath)[1].replace(",","") file_parent_origin_path = str(pathlib.Path(filepath).parent) try: - targetpath = path + '/' + number + c_word + houzhui + targetpath = path + '/' + number + leak_word + c_word + houzhui # 如果soft_link=1 使用软链接 if conf.soft_link() == 0: - os.rename(filepath, path + '/' + number + c_word + houzhui) + os.rename(filepath, targetpath) elif conf.soft_link() == 1: # 采用相对路径,以便网络访问时能正确打开视频 filerelpath = os.path.relpath(filepath, path) @@ -668,7 +668,7 @@ 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(filepath.replace(houzhui, subname)): # 字幕移动 - os.rename(filepath.replace(houzhui, subname), path + '/' + number + leak_word + c_word + subname) + os.rename(filepath.replace(houzhui, subname), path + '/' + number + part + leak_word + c_word + subname) print('[+]Sub moved!') print('[!]Success') return True