From 09731421ce57a9f04f366ab91cca6664d69ab59d Mon Sep 17 00:00:00 2001 From: tonquer Date: Fri, 12 Jan 2024 22:58:22 +0800 Subject: [PATCH] update --- CHANGELOG | 5 +++-- src/config/config.py | 6 ++++-- src/server/user_handler.py | 3 +-- src/task/qt_task.py | 2 +- src/tools/user.py | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 228ad69..78c36c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,11 +3,12 @@ # https://github.com/tonquer/picacg-qt ###################################################################################### # Version: v1.4.8 -# 2024/1/10 +# 2024/1/12 # 1) 优化下载图片新增超时自动重试 # 2) 下载右键菜单新增添加到本地漫画中 # 3) 下载新增更新所有New章节 -# 3) 分流新增IPV6, 修复CDN分流填入IPV6时部分封面无法加载 +# 4) 分流新增IPV6, 修复CDN分流填入IPV6时部分封面无法加载 +# 5) 修复勾选无代理时,部分封面下载仍然走代理的问题 # Version: v1.4.7 diff --git a/src/config/config.py b/src/config/config.py index c3b8443..2b6361c 100644 --- a/src/config/config.py +++ b/src/config/config.py @@ -15,7 +15,9 @@ Uuid = "defaultUuid" ProjectName = "PicACG" ThreadNum = 10 # 线程 DownloadThreadNum = 5 # 下载线程 -ResetDownloadCnt = 5 # 下载图片重试次数 +ResetDownloadCnt = 3 # 下载图片重试次数 +ResetDownloadCntDefault = 2 # 下载封面重试次数 + ConvertThreadNum = 3 # 同时转换数量 ChatSavePath = "chat" SavePathDir = "commies" # 下载目录 @@ -77,7 +79,7 @@ ProxyUrl3 = "https://hub.fastgit.xyz/tonquer/picacg-qt/discussions/48" Waifu2xUrl = "https://github.com/tonquer/picacg-qt/discussions/76" Address = ["188.114.98.153", "104.21.91.145"] # 分类2,3 Ip列表 -AddressIpv6 = ["2606:4700:d:28:dbf4:26f3:c265:73bc", "2606:4700:130:690d:f740:eaca:ca6c:5e3"] +AddressIpv6 = ["2606:4700:d:28:dbf4:26f3:c265:73bc", "2a06:98c1:3120:ca71:be2c:c721:d2b5:5dbf"] ImageServer2 = 's3.picacomic.com' # 分流2 使用的图片服务器 ImageServer2Jump = 'img.picacomic.com' # 分流2 跳转的图片服务器 diff --git a/src/server/user_handler.py b/src/server/user_handler.py index 41e8123..e57add0 100644 --- a/src/server/user_handler.py +++ b/src/server/user_handler.py @@ -11,7 +11,7 @@ from tools.status import Status from tools.tool import ToolUtil from tools.user import User from . import req -from .server import handler +from .server import handler, Server @handler(req.InitReq) class InitHandler(object): @@ -245,7 +245,6 @@ class DownloadBookHandler(object): except Exception as es: Log.Error(es) - from src.server.server import Server if backData.req.resetCnt > 0: backData.req.isReset = True Server().ReDownload(backData) diff --git a/src/task/qt_task.py b/src/task/qt_task.py index c2524d1..c88eaa5 100644 --- a/src/task/qt_task.py +++ b/src/task/qt_task.py @@ -56,7 +56,7 @@ class QtTaskBase: # downloadCallBack(data, laveFileSize) # downloadCompleteBack(data, st) # downloadCompleteBack(data, st, backParam) - def AddDownloadTask(self, url, path, downloadCallBack=None, completeCallBack=None, downloadStCallBack=None, backParam=None, loadPath="", cachePath="", savePath="", cleanFlag="", isReload=False, resetCnt=1): + def AddDownloadTask(self, url, path, downloadCallBack=None, completeCallBack=None, downloadStCallBack=None, backParam=None, loadPath="", cachePath="", savePath="", cleanFlag="", isReload=False, resetCnt=config.ResetDownloadCntDefault): from task.task_download import TaskDownload if not cleanFlag: cleanFlag = self.__taskFlagId diff --git a/src/tools/user.py b/src/tools/user.py index 5520595..d745a51 100644 --- a/src/tools/user.py +++ b/src/tools/user.py @@ -73,7 +73,8 @@ class User(Singleton): if Setting.ProxySelectIndex.value == 3: imageServer = config.ImageServer3 address = config.Address[1] - self.server.UpdateDns(address, imageServer) + if not Setting.PreIpv6.value: + self.server.UpdateDns(address, imageServer) self.initRes = backData.res return Status.Ok else: