From b6a76f6f7cc6784c6e8ca0a801098dc1955a4816 Mon Sep 17 00:00:00 2001 From: wumode Date: Thu, 4 Sep 2025 20:47:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(Alist):=20=E6=B7=BB=E5=8A=A0=5F=5Flen=5F=5F?= =?UTF-8?q?()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/filemanager/storages/alist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/modules/filemanager/storages/alist.py b/app/modules/filemanager/storages/alist.py index f302ff43..4f0031cd 100644 --- a/app/modules/filemanager/storages/alist.py +++ b/app/modules/filemanager/storages/alist.py @@ -615,6 +615,9 @@ class Alist(StorageBase, metaclass=WeakSingleton): self.uploaded_size = 0 self.file_size = file_path.stat().st_size + def __len__(self): + return self.file_size + def read(self, size=-1): if global_vars.is_transfer_stopped(path.as_posix()): logger.info(f"【OpenList】{path} 上传已取消!")