The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
fix: 修复任务恢复时速度不正确
AlphaQian63a7831351f4
diff --git a/app/common/download_task.py b/app/common/download_task.pyindex a4a1beb5..e0b6f12a 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([self.progress] * 10) # Rolling window of 10 seconds for speed calculation+ self.historyProgress = deque(maxlen = 10) # Rolling window of 10 seconds for speed calculation# HTTP client setupproxy = getProxy()@@ -720,6 +720,12 @@ 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())