The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
fix(i18n): extract the feature pack update popup (#1202)
Zhenfu Shib824a78faaa7
diff --git a/Ghost-Downloader-3.py b/Ghost-Downloader-3.pyindex a1201c29..f034eca0 100644--- a/Ghost-Downloader-3.py+++ b/Ghost-Downloader-3.py@@ -369,14 +369,7 @@ def startApp(application: Application, primaryInstance: PrimaryInstance, isSilenupdateService.download(info.targetId)elif info.targetId != "app" and info.state == UpdateState.READY:if window is not None:- from qfluentwidgets import InfoBar, InfoBarPosition- InfoBar.success(- window.tr("功能包更新"),- window.tr("{0} 将在下次启动时生效").format(info.label),- duration=5000,- position=InfoBarPosition.BOTTOM_RIGHT,- parent=window,- )+ window.showPackUpdateReady(info.label)updateService.changed.connect(onUpdateChanged)checkUpdateAtStartup(updateService)diff --git a/app/assets/i18n/gd3.en_US.ts b/app/assets/i18n/gd3.en_US.tsindex d3b4f57c..46ad6631 100644--- a/app/assets/i18n/gd3.en_US.ts+++ b/app/assets/i18n/gd3.en_US.ts@@ -2854,6 +2854,16 @@ select "No Emulation" to send as-is</translation></context><context><name>MainWindow</name>+ <message>+ <location filename="../../view/windows/main_window.py" line="375"/>+ <source>功能包更新</source>+ <translation>Feature Pack Update</translation>+ </message>+ <message>+ <location filename="../../view/windows/main_window.py" line="376"/>+ <source>{0} 将在下次启动时生效</source>+ <translation>{0} will take effect on next launch</translation>+ </message><message><location filename="../../view/windows/main_window.py" line="433"/><source>程序发生异常</source>diff --git a/app/assets/i18n/gd3.zh_CN.ts b/app/assets/i18n/gd3.zh_CN.tsindex d034e812..8a2086a5 100644--- a/app/assets/i18n/gd3.zh_CN.ts+++ b/app/assets/i18n/gd3.zh_CN.ts@@ -2842,6 +2842,16 @@ http://example.com/{mp4,mkv}/video</source></context><context><name>MainWindow</name>+ <message>+ <location filename="../../view/windows/main_window.py" line="375"/>+ <source>功能包更新</source>+ <translation type="unfinished"></translation>+ </message>+ <message>+ <location filename="../../view/windows/main_window.py" line="376"/>+ <source>{0} 将在下次启动时生效</source>+ <translation type="unfinished"></translation>+ </message><message><location filename="../../view/windows/main_window.py" line="433"/><source>程序发生异常</source>diff --git a/app/view/windows/main_window.py b/app/view/windows/main_window.pyindex 030d3342..dfd8cb3f 100644--- a/app/view/windows/main_window.py+++ b/app/view/windows/main_window.py@@ -370,6 +370,15 @@ class MainWindow(MSFluentWindow):infoBar.addWidget(sponsorButton)infoBar.show()+ def showPackUpdateReady(self, label: str) -> None:+ InfoBar.success(+ self.tr("功能包更新"),+ self.tr("{0} 将在下次启动时生效").format(label),+ duration=5000,+ position=InfoBarPosition.BOTTOM_RIGHT,+ parent=self,+ )+def _downloadBestAsset(self) -> None:from app.update import fetchBestAssetUrl