️ 无正则时跳过重命名任务

This commit is contained in:
Cp0204 2024-05-31 11:07:12 +08:00
parent 65f9c9669b
commit a4bd83705f

View File

@ -621,6 +621,8 @@ class Quark:
return response
def do_rename_task(self, task, subdir_path=""):
if not task["pattern"] or not task["replace"]:
return 0
savepath = re.sub(r"/{2,}", "/", f"/{task['savepath']}{subdir_path}")
if not self.savepath_fid.get(savepath):
self.savepath_fid[savepath] = self.get_fids([savepath])[0]["fid"]