mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-18 19:00:44 +08:00
Compare commits
2 Commits
46ec89d201
...
518037cee8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
518037cee8 | ||
|
|
b153b2aaf6 |
@ -164,7 +164,9 @@ class Alist_sync:
|
|||||||
|
|
||||||
# 获取网盘已有文件
|
# 获取网盘已有文件
|
||||||
source_dir_list = self.get_path_list(self.source_path)
|
source_dir_list = self.get_path_list(self.source_path)
|
||||||
|
if not source_dir_list:
|
||||||
|
print("获取夸克文件列表失败,请检查网络或手动刷新alist中的夸克目录")
|
||||||
|
return 0
|
||||||
if self.tv_mode == 0 or self.tv_mode == "":
|
if self.tv_mode == 0 or self.tv_mode == "":
|
||||||
self.tv_mode = False
|
self.tv_mode = False
|
||||||
else:
|
else:
|
||||||
@ -228,6 +230,10 @@ class Alist_sync:
|
|||||||
.lower()
|
.lower()
|
||||||
)
|
)
|
||||||
for target_list in target_dir_list:
|
for target_list in target_dir_list:
|
||||||
|
if source_list["is_dir"]:
|
||||||
|
# print(f"跳过目录同步")
|
||||||
|
skip = True
|
||||||
|
break
|
||||||
if self.tv_mode:
|
if self.tv_mode:
|
||||||
target_list_filename = (
|
target_list_filename = (
|
||||||
target_list["name"]
|
target_list["name"]
|
||||||
|
|||||||
@ -302,11 +302,11 @@ class MagicRename:
|
|||||||
|
|
||||||
def set_dir_file_list(self, file_list, replace):
|
def set_dir_file_list(self, file_list, replace):
|
||||||
"""设置目录文件列表"""
|
"""设置目录文件列表"""
|
||||||
if not file_list:
|
|
||||||
return
|
|
||||||
self.dir_filename_dict = {}
|
self.dir_filename_dict = {}
|
||||||
filename_list = [f["file_name"] for f in file_list if not f["dir"]]
|
filename_list = [f["file_name"] for f in file_list if not f["dir"]]
|
||||||
filename_list.sort()
|
filename_list.sort()
|
||||||
|
if not filename_list:
|
||||||
|
return
|
||||||
if match := re.search(r"\{I+\}", replace):
|
if match := re.search(r"\{I+\}", replace):
|
||||||
# 由替换式转换匹配式
|
# 由替换式转换匹配式
|
||||||
magic_i = match.group()
|
magic_i = match.group()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user