The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
取消 self.isStop 变量
XiaoYouChR4f3126385192
diff --git a/app/common/download_task.py b/app/common/download_task.pyindex b941bf5b..332daa34 100644--- a/app/common/download_task.py+++ b/app/common/download_task.py@@ -73,7 +73,6 @@ class DownloadTask(QThread):def __init__(self, url, maxBlockNum: int = 8, filePath=None, fileName=None, parent=None):super().__init__(parent)- self.isStop = Falseself.process = 0self.url = urlself.fileName = fileName@@ -89,8 +88,6 @@ class DownloadTask(QThread):self.__tempThread.start()def __reassignWorker(self, task: Task):- if self.isStop:- return# 找到剩余进度最多的线程maxRemainder = 0@@ -305,8 +302,6 @@ class DownloadTask(QThread):self.gotWrong.emit(repr(e))def stop(self):- self.isStop = True-for task in self.tasks:task.cancel()