diff --git a/plugins/alist.py b/plugins/alist.py index 47c7029..5721bef 100644 --- a/plugins/alist.py +++ b/plugins/alist.py @@ -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 "" diff --git a/plugins/alist_strm_gen.py b/plugins/alist_strm_gen.py index 0e3b636..cc614fe 100644 --- a/plugins/alist_strm_gen.py +++ b/plugins/alist_strm_gen.py @@ -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 ""