The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
下载完成后可以单击任务卡片打开文件
XiaoYouChR9048ce8f011d
diff --git a/app/components/Ui_TaskCard.py b/app/components/Ui_TaskCard.pyindex 987708bd..5eefd438 100644--- a/app/components/Ui_TaskCard.py+++ b/app/components/Ui_TaskCard.py@@ -12,7 +12,8 @@ from PySide6.QtCore import (QCoreApplication, QMetaObject, QSize, Qt)from PySide6.QtWidgets import (QHBoxLayout, QSizePolicy, QSpacerItem,QVBoxLayout)-from qfluentwidgets import (BodyLabel, PixmapLabel, TitleLabel, ToolButton, RoundMenu, Action, PrimaryDropDownToolButton)+from qfluentwidgets import (BodyLabel, PixmapLabel, TitleLabel, ToolButton, RoundMenu, Action,+ DropDownToolButton, PrimaryToolButton)from qfluentwidgets import FluentIcon as FIF@@ -57,7 +58,7 @@ class Ui_TaskCard(object):self.horizontalLayout.addItem(self.horizontalSpacer)- self.pauseButton = ToolButton(TaskCard)+ self.pauseButton = PrimaryToolButton(TaskCard)self.pauseButton.setObjectName(u"pauseButton")self.pauseButton.setMinimumSize(QSize(31, 31))self.pauseButton.setMaximumSize(QSize(31, 31))@@ -71,12 +72,12 @@ class Ui_TaskCard(object):self.horizontalLayout.addWidget(self.folderButton)- self.fileButton = ToolButton(TaskCard)- self.fileButton.setObjectName(u"folderButton")- self.fileButton.setMinimumSize(QSize(31, 31))- self.fileButton.setMaximumSize(QSize(31, 31))-- self.horizontalLayout.addWidget(self.fileButton)+ # self.fileButton = ToolButton(TaskCard)+ # self.fileButton.setObjectName(u"folderButton")+ # self.fileButton.setMinimumSize(QSize(31, 31))+ # self.fileButton.setMaximumSize(QSize(31, 31))+ #+ # self.horizontalLayout.addWidget(self.fileButton)self.Menu = RoundMenu(parent=self)self.delAction = Action(FIF.DELETE, "删除")@@ -84,7 +85,7 @@ class Ui_TaskCard(object):self.Menu.addAction(self.delAction)self.Menu.addAction(self.completelyDelAction)- self.cancelButton = PrimaryDropDownToolButton(TaskCard)+ self.cancelButton = DropDownToolButton(TaskCard)self.cancelButton.setObjectName(u"cancelButton")self.cancelButton.setMenu(self.Menu)self.cancelButton.setMinimumSize(QSize(61, 31))@@ -130,7 +131,7 @@ class Ui_TaskCard(object):self.pauseButton.setIcon(FIF.PAUSE)self.cancelButton.setIcon(FIF.DELETE)self.folderButton.setIcon(FIF.FOLDER)- self.fileButton.setIcon(FIF.LIBRARY)+ # self.fileButton.setIcon(FIF.LIBRARY)self.retranslateUi(TaskCard)@@ -143,6 +144,6 @@ class Ui_TaskCard(object):self.pauseButton.setText("")self.cancelButton.setText("")self.folderButton.setText("")- self.fileButton.setText("")+ # self.fileButton.setText("")self.processLabel.setText("")# retranslateUidiff --git a/app/components/task_card.py b/app/components/task_card.pyindex de41a775..978c1972 100644--- a/app/components/task_card.py+++ b/app/components/task_card.py@@ -90,8 +90,6 @@ class TaskCard(CardWidget, Ui_TaskCard):self.LogoPixmapLabel.setPixmap(pixmap)self.LogoPixmapLabel.setFixedSize(91, 91)- self.fileButton.clicked.connect(lambda: os.system(f"{self.filePath}/{self.fileName}"))-self.taskFinished()# 连接信号到槽@@ -128,8 +126,6 @@ class TaskCard(CardWidget, Ui_TaskCard):self.LogoPixmapLabel.setFixedSize(91, 91)# self.processLabel.setText(f"0B/{getReadableSize(self.task.fileSize)}")- self.fileButton.clicked.connect(lambda :os.system(f"{self.filePath}/{self.fileName}"))-# 写入未完成任务记录文件,以供下次打开时继续下载if not self.autoCreated:with open("{}/Ghost Downloader 记录文件".format(cfg.appPath), "a", encoding="utf-8") as f:@@ -260,6 +256,7 @@ class TaskCard(CardWidget, Ui_TaskCard):def taskFinished(self):self.pauseButton.setDisabled(True)self.cancelButton.setDisabled(True)+ self.clicked.connect(lambda: os.system(f"{self.filePath}/{self.fileName}"))self.speedLable.setText("任务已经完成")try: # 程序启动时不要发