The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
Revert "fix: 修复任务恢复时速度不正确"
XiaoYouChRcffa05237c4f
diff --git a/app/common/download_task.py b/app/common/download_task.pyindex e0b6f12a..a4a1beb5 100644--- a/app/common/download_task.py+++ b/app/common/download_task.py@@ -223,7 +223,7 @@ class DownloadTask(QThread):self.downloadStrategy = None# Speed tracking- self.historyProgress = deque(maxlen = 10) # Rolling window of 10 seconds for speed calculation+ self.historyProgress = deque([self.progress] * 10) # Rolling window of 10 seconds for speed calculation# HTTP client setupproxy = getProxy()@@ -720,12 +720,6 @@ class DownloadTask(QThread):# Load or create workersself.__loadWorkers()- # Calculate total progress- self.progress = 0- for worker in self.workers:- self.progress += worker.progress - worker.startPos- self.historyProgress = deque([self.progress] * 10, maxlen = 10)-# Create and configure event loopif sys.platform == "win32":asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())