mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-11 22:50:45 +08:00
🐛 修复目录路径拼接无 / 开头问题 #44
This commit is contained in:
parent
b21c75e125
commit
95d1449651
@ -173,10 +173,10 @@ class Alist:
|
||||
"GET", url, headers=headers, params=querystring
|
||||
).json()
|
||||
if response["code"] == 0:
|
||||
file_names = [
|
||||
item["file_name"] for item in response["data"]["full_path"]
|
||||
]
|
||||
return "/".join(file_names)
|
||||
path = ""
|
||||
for item in response["data"]["full_path"]:
|
||||
path = f"{path}/{item['file_name']}"
|
||||
return path
|
||||
except Exception as e:
|
||||
print(f"Alist刷新: 获取Quark路径出错 {e}")
|
||||
return ""
|
||||
|
||||
@ -198,10 +198,10 @@ class Alist_strm_gen:
|
||||
"GET", url, headers=headers, params=querystring
|
||||
).json()
|
||||
if response["code"] == 0:
|
||||
file_names = [
|
||||
item["file_name"] for item in response["data"]["full_path"]
|
||||
]
|
||||
return "/".join(file_names)
|
||||
path = ""
|
||||
for item in response["data"]["full_path"]:
|
||||
path = f"{path}/{item['file_name']}"
|
||||
return path
|
||||
except Exception as e:
|
||||
print(f"Alist-Strm生成: 获取Quark路径出错 {e}")
|
||||
return ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user