mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-16 17:30:43 +08:00
🐛 修复获取挂载路径失败的错误处理
- 在获取文件列表时添加错误检查 - 如果获取失败,打印错误信息以便调试
This commit is contained in:
parent
0a47d48c60
commit
925144ea79
@ -67,7 +67,9 @@ class Alist:
|
||||
if match := re.match(r"^(\/[^:]*):(\/[^:]*)$", storage_id):
|
||||
# 存储挂载路径, 夸克根文件夹
|
||||
storage_mount_path, quark_root_dir = match.group(1), match.group(2)
|
||||
if not self.get_file_list(storage_mount_path):
|
||||
file_list = self.get_file_list(storage_mount_path)
|
||||
if file_list.get("code") != 200:
|
||||
print(f"Alist刷新: 获取挂载路径失败❌ {file_list.get('message')}")
|
||||
return False, (None, None)
|
||||
# 2. 检查是否数字,调用 Alist API 获取存储信息
|
||||
elif re.match(r"^\d+$", storage_id):
|
||||
|
||||
@ -80,7 +80,9 @@ class Alist_strm_gen:
|
||||
if match := re.match(r"^(\/[^:]*):(\/[^:]*)$", storage_id):
|
||||
# 存储挂载路径, 夸克根文件夹
|
||||
storage_mount_path, quark_root_dir = match.group(1), match.group(2)
|
||||
if not self.get_file_list(storage_mount_path):
|
||||
file_list = self.get_file_list(storage_mount_path)
|
||||
if file_list.get("code") != 200:
|
||||
print(f"Alist-Strm生成: 获取挂载路径失败❌ {file_list.get('message')}")
|
||||
return False, (None, None)
|
||||
# 2. 检查是否数字,调用 Alist API 获取存储信息
|
||||
elif re.match(r"^\d+$", storage_id):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user