fix(Alist): 添加__len__()

This commit is contained in:
wumode
2025-09-04 20:47:13 +08:00
parent 84e5b77a5c
commit b6a76f6f7c

View File

@@ -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} 上传已取消!")