From 997434f207c2ce4c2a313f135c12ea88bcb93fba Mon Sep 17 00:00:00 2001 From: Zzaphkiel <1278228162@qq.com> Date: Sat, 16 Mar 2024 01:21:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E8=87=B3=200.11.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/config.py | 4 ++-- app/components/message_box.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/common/config.py b/app/common/config.py index ec860f6c..7e035819 100644 --- a/app/common/config.py +++ b/app/common/config.py @@ -58,7 +58,7 @@ class Config(QConfig): careerGamesNumber = RangeConfigItem("Functions", "CareerGamesNumber", 20, RangeValidator(10, 60)) - apiConcurrencyNumber = RangeConfigItem("Functions", "ApiConcurrencyNumber", 2, + apiConcurrencyNumber = RangeConfigItem("Functions", "ApiConcurrencyNumber", 1, RangeValidator(1, 5), restart=True) gameInfoFilter = ConfigItem( @@ -125,7 +125,7 @@ class Config(QConfig): YEAR = 2023 AUTHOR = "Zaphkiel" -VERSION = "0.10.3" +VERSION = "0.11.0" FEEDBACK_URL = "https://github.com/Zzaphkiel/Seraphine/issues?q=is%3Aissue" GITHUB_URL = "https://github.com/Zzaphkiel/Seraphine" LOCAL_PATH = f"{os.getenv('APPDATA')}\\Seraphine" diff --git a/app/components/message_box.py b/app/components/message_box.py index a1d49584..d5557e7e 100644 --- a/app/components/message_box.py +++ b/app/components/message_box.py @@ -84,6 +84,15 @@ def __initLayout(self): @asyncSlot() async def __onYesButtonClicked(self): + ''' + 该函数负责 + 1. 删除 `LOCAL_PATH` 中之前可能下载过的文件 + 2. 重新下载新版本压缩包 + 3. 解压缩,并删除压缩包 + 4. 释放并运行 bat 文件,关闭自己 + 5. 删除当前文件夹下的自己,并将解压好的新版本拷贝进来 + 6. 重新运行自己 + ''' url = f"{github.proxyApi}/{self.info['assets'][0]['browser_download_url']}" self.myYesButton.setEnabled(False) self.myCancelButton.setEnabled(False)