fix progress step

This commit is contained in:
jxxghp
2025-08-24 16:33:44 +08:00
parent 2285befebb
commit 8fac8c5307
6 changed files with 17 additions and 16 deletions
+4 -1
View File
@@ -43,6 +43,9 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
# 基础url
base_url = "https://proapi.115.com"
# 文件块大小,默认10MB
chunk_size = 10 * 1024 * 1024
def __init__(self):
super().__init__()
self._auth_state = {}
@@ -610,7 +613,7 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
downloaded_size = 0
with open(local_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
for chunk in r.iter_content(chunk_size=self.chunk_size):
if chunk:
f.write(chunk)
downloaded_size += len(chunk)