The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
- 修改 Linux 版本的图标文件格式和 PySide6 依赖版本 - 移动 Windows 版本判断函数, 防止打不开
XiaoYouChR19642d296a70
diff --git a/app/common/methods.py b/app/common/methods.pyindex 31947d2f..794da5e7 100644--- a/app/common/methods.py+++ b/app/common/methods.py@@ -13,7 +13,7 @@ from time import sleep, localtime, time_nsfrom urllib.parse import unquote, parse_qs, urlparseimport httpx-from PySide6.QtCore import QUrl+from PySide6.QtCore import QUrl, QOperatingSystemVersionfrom PySide6.QtGui import QDesktopServicesfrom PySide6.QtWidgets import QApplicationfrom loguru import logger@@ -25,11 +25,22 @@ from app.common.signal_bus import signalBusplugins = []+def isGreaterEqualWin10():+ """ determine if the Windows version ≥ Win10 """+ cv = QOperatingSystemVersion.current()+ return sys.platform == "win32" and cv.majorVersion() >= 10++def isLessThanWin10():+ """ determine if the Windows version < Win10"""+ cv = QOperatingSystemVersion.current()+ return sys.platform == "win32" and cv.majorVersion() < 10++def isGreaterEqualWin11():+ """ determine if the windows version ≥ Win11 """+ return isGreaterEqualWin10() and sys.getwindowsversion().build >= 22000def isBorderAccentColorOpen():""" Check whether the border accent color is open """- from qframelesswindow.utils.win32_utils import isGreaterEqualWin11-if not isGreaterEqualWin11():return Falsediff --git a/app/view/main_window.py b/app/view/main_window.pyindex 2858357b..61f45d1b 100644--- a/app/view/main_window.py+++ b/app/view/main_window.py@@ -16,23 +16,13 @@ from .setting_interface import SettingInterfacefrom .task_interface import TaskInterfacefrom ..common.config import cfg, Headers, attachmentTypes, FEEDBACK_URLfrom ..common.custom_socket import GhostDownloaderSocketServer-from ..common.methods import getLinkInfo, bringWindowToTop, addDownloadTask, showMessageBox, isBorderAccentColorOpen+from ..common.methods import getLinkInfo, bringWindowToTop, addDownloadTask, showMessageBox, isBorderAccentColorOpen, \+ isGreaterEqualWin10, isLessThanWin10from ..common.signal_bus import signalBusfrom ..components.add_task_dialog import AddTaskOptionDialogfrom ..components.custom_tray import CustomSystemTrayIconfrom ..components.update_dialog import checkUpdate--def isGreaterEqualWin10():- """ determine if the Windows version ≥ Win10 """- cv = QOperatingSystemVersion.current()- return sys.platform == "win32" and cv.majorVersion() >= 10--def isLessThanWin10():- """ determine if the Windows version < Win10"""- cv = QOperatingSystemVersion.current()- return sys.platform == "win32" and cv.majorVersion() < 10-class CustomSplashScreen(SplashScreen):def finish(self):diff --git a/app/view/pop_up_window.py b/app/view/pop_up_window.pyindex 64f4c611..427d5006 100644--- a/app/view/pop_up_window.py+++ b/app/view/pop_up_window.py@@ -7,7 +7,7 @@ from PySide6.QtWidgets import QWidget, QFileIconProvider, QPushButton, QToolButtfrom qfluentwidgets import FluentIcon as FIFfrom qfluentwidgets.common.screen import getCurrentScreenGeometryfrom qframelesswindow import WindowEffect-from qframelesswindow.utils.win32_utils import isGreaterEqualWin10+from app.common.methods import isGreaterEqualWin10from app.common.methods import openFile, bringWindowToTop, isAbleToShowToastfrom app.view.Ui_PopUpWindow import Ui_PopUpWindowdiff --git a/deploy.py b/deploy.pyindex 425f199c..938ceb4c 100644--- a/deploy.py+++ b/deploy.py@@ -49,7 +49,7 @@ else:'--assume-yes-for-downloads','--show-memory','--show-progress',- '--linux-icon=resources/logo.ico',+ '--linux-icon=resources/logo.png','--output-dir=dist','Ghost-Downloader-3.py',]diff --git a/requirements.txt b/requirements.txtindex 9ebd1699..4a948dd2 100644--- a/requirements.txt+++ b/requirements.txt@@ -1,5 +1,6 @@PySide6-Fluent-Widgets>=1.7.4-PySide6==6.7.3+PySide6==6.9.0; sys_platform!="win32"+PySide6==6.7.3; sys_platform=="win32"loguruhttpx[socks]aiofiles