From 95d144965158e34888e2fc3cefaf216dc4e826d8 Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Wed, 4 Dec 2024 10:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E8=B7=AF=E5=BE=84=E6=8B=BC=E6=8E=A5=E6=97=A0=20/=20?= =?UTF-8?q?=E5=BC=80=E5=A4=B4=E9=97=AE=E9=A2=98=20#44?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/alist.py | 8 ++++---- plugins/alist_strm_gen.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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 ""