Skip to content

The only downloader you need. 下载器的集大成者。

Version 3.1.1 爽的遭不住~ 1、微调界面 2、优化了一些内存没有及时回收的问题 3、更新了版本号

XiaoYouChRbb3abe9a6dde
diff --git a/Res.qrc b/Res.qrc
deleted file mode 100644
index 08370da6..00000000
--- a/Res.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="icon">
- <file>play.svg</file>
- <file>pause.svg</file>
- <file>logo.png</file>
- </qresource>
-</RCC>
diff --git a/app/components/add_task_option_dialog.py b/app/components/add_task_option_dialog.py
index 1430df2a..e03fa482 100644
--- a/app/components/add_task_option_dialog.py
+++ b/app/components/add_task_option_dialog.py
@@ -6,7 +6,7 @@ from PySide6.QtCore import Signal, QDir, Qt, QTimer
from PySide6.QtGui import QColor
from PySide6.QtWidgets import QVBoxLayout, QFileDialog, QHBoxLayout, QSizePolicy
from qfluentwidgets import PushSettingCard, SettingCardGroup, RangeSettingCard, RangeConfigItem, RangeValidator, \
- PushButton, PrimaryPushButton, ComboBoxSettingCard, OptionsValidator, OptionsConfigItem, TextEdit, \
+ PushButton, PrimaryPushButton, TextEdit, \
MessageBox, isDarkTheme, InfoBar, InfoBarPosition
from qfluentwidgets.common.icon import FluentIcon as FIF
from qfluentwidgets.components.dialog_box.mask_dialog_base import MaskDialogBase
@@ -44,8 +44,8 @@ class AddTaskOptionDialog(MaskDialogBase):
self.widget.setLayout(self.VBoxLayout)
- self.widget.setMinimumSize(510, 400)
- self.widget.setMaximumSize(680, 410)
+ self.widget.setMinimumSize(510, 420)
+ self.widget.setMaximumSize(680, 430)
if isDarkTheme():
# C = ThemeColor.DARK_3.color()
self.widget.setStyleSheet(".QFrame{border-radius:10px;background-color:rgb(39,39,39)}")
@@ -176,7 +176,7 @@ class AddTaskOptionDialog(MaskDialogBase):
self._timer = QTimer()
self._timer.setSingleShot(True)
self._timer.timeout.connect(self.__processTextChange)
- self._timer.start(300) # 1秒后处理
+ self._timer.start(1000) # 1秒后处理
def __processTextChange(self):
""" link text changed slot """
@@ -196,6 +196,6 @@ class AddTaskOptionDialog(MaskDialogBase):
isClosable=True,
position=InfoBarPosition.TOP,
# position='Custom', # NOTE: use custom info bar manager
- duration=500,
+ duration=1000,
parent=self.parent()
)
diff --git a/app/components/download_option_dialog.py b/app/components/download_option_dialog.py
index 1451b784..86de7920 100644
--- a/app/components/download_option_dialog.py
+++ b/app/components/download_option_dialog.py
@@ -31,8 +31,8 @@ class DownloadOptionDialog(MaskDialogBase):
self.widget.setLayout(self.VBoxLayout)
- self.widget.setMinimumSize(510, 510)
- self.widget.setMaximumSize(680, 520)
+ self.widget.setMinimumSize(510, 530)
+ self.widget.setMaximumSize(680, 540)
if isDarkTheme():
# C = ThemeColor.DARK_3.color()
self.widget.setStyleSheet(".QFrame{border-radius:10px;background-color:rgb(39,39,39)}")
diff --git a/app/view/home_interface.py b/app/view/home_interface.py
index 122b4216..737791d4 100644
--- a/app/view/home_interface.py
+++ b/app/view/home_interface.py
@@ -4,13 +4,14 @@ import json
import requests
from PySide6.QtCore import Qt, QThread, Signal
from PySide6.QtGui import QPixmap
-from PySide6.QtWidgets import QWidget, QFrame
+from PySide6.QtWidgets import QWidget, QFrame, QVBoxLayout
from loguru import logger
-from qfluentwidgets import SmoothScrollArea, TitleLabel, ExpandLayout
+from qfluentwidgets import ScrollArea, TitleLabel, ExpandLayout
from ..common.tool_hub import getWindowsProxy
from ..components.system_info_card import SystemInfoCard
+
class getInfoThread(QThread):
gotInfo = Signal(list)
def __init__(self, parent=None):
@@ -27,7 +28,7 @@ class getInfoThread(QThread):
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"},
proxies=getWindowsProxy()).content)["OS"])
-class HomeInterface(SmoothScrollArea):
+class HomeInterface(ScrollArea):
def __init__(self, parent=None):
super().__init__(parent=parent)
@@ -49,7 +50,7 @@ class HomeInterface(SmoothScrollArea):
self.setFrameShape(QFrame.NoFrame)
self.scrollWidget = QWidget()
self.scrollWidget.setMinimumWidth(816)
- self.expandLayout = ExpandLayout(self.scrollWidget)
+ self.expandLayout = QVBoxLayout(self.scrollWidget)
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.loadingLabel = TitleLabel("正在加载", self.scrollWidget)
self.loadingLabel.setObjectName("noTaskLabel")
diff --git a/app/view/main_window.py b/app/view/main_window.py
index 29838a8a..20c8833e 100644
--- a/app/view/main_window.py
+++ b/app/view/main_window.py
@@ -14,6 +14,7 @@ from .task_interface import TaskInterface
from ..common.signal_bus import signalBus
from ..components.add_task_option_dialog import AddTaskOptionDialog
+
class ThemeChangedListener(QThread):
themeChanged = Signal(str)
def __init__(self, parent=None):
@@ -94,7 +95,7 @@ class MainWindow(MSFluentWindow):
def initWindow(self):
self.resize(960, 780)
self.setWindowIcon(QIcon(':/image/logo.png'))
- self.setWindowTitle('幽灵下载器')
+ self.setWindowTitle('Ghost Downloader')
# create splash screen
self.splashScreen = SplashScreen(self.windowIcon(), self)
@@ -110,7 +111,7 @@ class MainWindow(MSFluentWindow):
def showInfoMessageBox(self):
w = MessageBox(
'About',
- 'Version 3.1.0\n© 2024 XiaoYouChR',
+ 'Version 3.1.1\n© 2024 XiaoYouChR',
self
)
w.yesButton.setText('了解作者')
@@ -134,8 +135,10 @@ class MainWindow(MSFluentWindow):
for j in i.task.workers:
try:
j.file.close()
+ except AttributeError as e:
+ logger.info(f"Task:{self.fileName}, users operate too quickly!, thread {i} error: {e}")
except Exception as e:
- logger.error(
+ logger.warning(
f"Task:{self.fileName}, it seems that cannot cancel thread {i} occupancy of the file, error: {e}")
j.terminate()
i.task.terminate()
diff --git a/app/view/task_interface.py b/app/view/task_interface.py
index 04741ded..bafeace7 100644
--- a/app/view/task_interface.py
+++ b/app/view/task_interface.py
@@ -1,19 +1,15 @@
-from pathlib import Path
-from time import sleep
-
from PySide6.QtCore import Qt
from PySide6.QtGui import QPixmap
from PySide6.QtWidgets import QWidget, QFrame, QHBoxLayout, QSpacerItem, QSizePolicy
-from loguru import logger
-from qfluentwidgets import SmoothScrollArea, TitleLabel, PrimaryPushButton, PushButton, ExpandLayout, SplitPushButton, \
- RoundMenu, Action, InfoBar, InfoBarPosition
from qfluentwidgets import FluentIcon as FIF
+from qfluentwidgets import ScrollArea, TitleLabel, PrimaryPushButton, PushButton, ExpandLayout, SplitPushButton, \
+ RoundMenu, Action, InfoBar, InfoBarPosition
from ..common.signal_bus import signalBus
from ..components.task_card import TaskCard
-class TaskInterface(SmoothScrollArea):
+class TaskInterface(ScrollArea):
def __init__(self, parent=None):
super().__init__(parent=parent)
@@ -70,7 +66,7 @@ class TaskInterface(SmoothScrollArea):
self.allPauseButton = PushButton(self.toolsBar)
self.allPauseButton.setObjectName(u"allPauseButton")
- self.allPauseButton.setIcon(FIF.PAUSE)
+ self.allPauseButton.setIcon(FIF.STOP_WATCH)
self.horizontalLayout.addWidget(self.allPauseButton)
self.allDeleteButton = SplitPushButton(self.toolsBar)
diff --git a/logo_old.png b/logo_old.png
new file mode 100644
index 00000000..fa02a503
Binary files /dev/null and b/logo_old.png differ
diff --git a/pysidedeploy.spec b/pysidedeploy.spec
deleted file mode 100644
index 692088b4..00000000
--- a/pysidedeploy.spec
+++ /dev/null
@@ -1,31 +0,0 @@
-[app]
-# title of your application
-title = Ghost Downloader 3
-# project directory. the general assumption is that project_dir is the parent directory
-# of input_file
-project_dir = .
-# source file path
-input_file = C:\Users\XiaoYouChR\Desktop\Ghost-Downloader-3\main.py
-# directory where exec is stored
-exec_directory = .
-# path to .pyproject project file
-project_file =
-
-[python]
-# python path
-python_path = C:\Users\XiaoYouChR\PycharmProjects\PyQt-Fluent-Widgets\venv\Scripts\python.exe
-# python packages to install
-# ordered-set = increase compile time performance of nuitka packaging
-# zstandard = provides final executable size optimization
-packages = nuitka,ordered_set,zstandard
-
-[qt]
-# comma separated path to qml files required
-# normally all the qml files are added automatically
-qml_files =
-
-[nuitka]
-# (str) specify any extra nuitka arguments
-# eg = extra_args = --show-modules --follow-stdlib
-extra_args = --quiet --windows-icon-from-ico=./logo.ico --windows-disable-console
-