Compare commits

...

4 Commits

Author SHA1 Message Date
Y_C_Z
a949220cfc
Merge 50d01bb4d8 into f62ca7a057 2025-04-22 13:24:52 +08:00
Cp0204
f62ca7a057 🐛 修正获取保存路径的多余斜杠 /
Some checks failed
Docker Publish / build-and-push (push) Has been cancelled
2025-04-22 13:24:39 +08:00
Hinata
c3ff5a49bd
🐛 Fix SyntaxError 2025-04-22 09:34:22 +08:00
Y_C_Z
50d01bb4d8
每次转存都清空目标文件夹 2025-04-16 12:13:33 +08:00
3 changed files with 14 additions and 1 deletions

View File

@ -304,6 +304,7 @@ def get_savepath_detail():
account = Quark(config_data["cookie"][0], 0)
paths = []
if path := request.args.get("path"):
path = re.sub(r"/+", "/", path)
if path == "/":
fid = 0
else:

View File

@ -983,6 +983,7 @@
this.fileSelect.paths = [];
this.fileSelect.index = index;
$('#fileSelectModal').modal('toggle');
this.formData.tasklist[index].savepath = this.formData.tasklist[index].savepath.replace(/\/+/g, "/");
this.getSavepathDetail(this.formData.tasklist[index].savepath);
},
getShareDetail() {

View File

@ -691,6 +691,17 @@ class Quark:
to_pdir_fid = self.savepath_fid[savepath]
dir_file_list = self.ls_dir(to_pdir_fid)
# print("dir_file_list: ", dir_file_list)
# 清空目标文件夹
fid_list = [item["fid"] for item in dir_file_list]
if fid_list:
self.delete(fid_list)
recycle_list = self.recycle_list()
record_id_list = [
item["record_id"] for item in recycle_list if item["fid"] in fid_list
]
self.recycle_remove(record_id_list)
# 重新获取目标目录文件列表
dir_file_list = self.ls_dir(to_pdir_fid)
tree.create_node(
savepath,
@ -932,7 +943,7 @@ def do_save(account, tasklist=[]):
print(f"更子目录: {task['update_subdir']}")
if task.get("runweek") or task.get("enddate"):
print(
f"运行周期: WK{task.get("runweek",[])} ~ {task.get('enddate','forever')}"
f"运行周期: WK{task.get('runweek',[])} ~ {task.get('enddate','forever')}"
)
print()
# 判断任务周期