diff --git a/logs/all.log b/logs/all.log index 9aa9e0d..09793bb 100644 --- a/logs/all.log +++ b/logs/all.log @@ -7,3 +7,6 @@ 2025-01-15 10:27:37.635 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build 2025-01-15 10:27:37.636 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull 2025-01-15 10:27:45.997 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push +2025-01-15 11:00:54.856 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build +2025-01-15 11:00:54.858 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull +2025-01-15 11:01:02.338 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push diff --git a/logs/funbuild.log b/logs/funbuild.log index 9aa9e0d..09793bb 100644 --- a/logs/funbuild.log +++ b/logs/funbuild.log @@ -7,3 +7,6 @@ 2025-01-15 10:27:37.635 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build 2025-01-15 10:27:37.636 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull 2025-01-15 10:27:45.997 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push +2025-01-15 11:00:54.856 |INFO | funbuild.core.core : core: 99 | funbuild | - fundrive build +2025-01-15 11:00:54.858 |INFO | funbuild.core.core : core: 84 | funbuild | - fundrive pull +2025-01-15 11:01:02.338 |INFO | funbuild.core.core : core: 89 | funbuild | - fundrive push diff --git a/pyproject.toml b/pyproject.toml index 8deb359..1aab36c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fundrive" -version = "2.0.3" +version = "2.0.4" description = "fundrive" readme = "README.md" requires-python = ">=3.8" diff --git a/src/fundrive/drives/alipan/drive_open.py b/src/fundrive/drives/alipan/drive_open.py index 0c98d8e..fa50e6f 100644 --- a/src/fundrive/drives/alipan/drive_open.py +++ b/src/fundrive/drives/alipan/drive_open.py @@ -1,12 +1,13 @@ from datetime import datetime, timedelta, timezone from typing import Any, List, Optional -from fundrive.core import BaseDrive, DriveFile -from fundrive.core.base import get_filepath from fundrives.aliopen import AliOpenManage from funsecret import read_secret from funutil import getLogger +from fundrive.core import BaseDrive, DriveFile +from fundrive.core.base import get_filepath + logger = getLogger("fundrive") @@ -96,7 +97,7 @@ def get_file_list(self, fid: str = "root", *args, **kwargs) -> List[DriveFile]: :return: 文件信息列表 """ result = [] - for file in self.drive.get_file_list(parent_file_id=fid, type="file"): + for file in self.drive.get_file_list(parent_file_id=fid, type="file")["items"]: if file["type"] == "file": result.append( DriveFile( @@ -115,7 +116,9 @@ def get_dir_list(self, fid: str = "root", *args, **kwargs) -> List[DriveFile]: :return: 子目录信息列表 """ result = [] - for file in self.drive.get_file_list(parent_file_id=fid, type="folder"): + for file in self.drive.get_file_list(parent_file_id=fid, type="folder")[ + "items" + ]: result.append( DriveFile( fid=file["file_id"], name=file["name"], size=file["size"], ext=file diff --git a/uv.lock b/uv.lock index cb214f6..dd76729 100644 --- a/uv.lock +++ b/uv.lock @@ -571,7 +571,7 @@ wheels = [ [[package]] name = "fundrive" -version = "2.0.3" +version = "2.0.4" source = { virtual = "." } dependencies = [ { name = "funget" },