diff --git a/common/BaseComicEntity.py b/common/BaseComicEntity.py index d42ca73..536faba 100644 --- a/common/BaseComicEntity.py +++ b/common/BaseComicEntity.py @@ -134,9 +134,12 @@ class baseComic: #不存在ComicInfo.xml则生成 if is_next and fu.notExists(ComicPath.getPathComicInfoXML()): ci.writeComicInfoXML() if is_next and not is_old: + ComicPath.TIME_SLEEP = random.randint(8,15) downloadUtils.download_images(list_img,ComicPath.getDirComicChapter(),files_name=files_name,concurrency=5,timeout=10) # ntfy.sendMsg("等待数据检验中...",sleep=0.5) is_next = fu.equImages(ComicPath.getDirComicChapter(),list_img) # if not is_next: ntfy.sendMsg(msg=f"下载数据(不完整,{int(repeat*2)}秒钟后尝试第{repeat}次",sleep=int(repeat*2)) # repeat += 1 + else: + ComicPath.TIME_SLEEP = 0.5 return is_next \ No newline at end of file diff --git a/common/Constant.py b/common/Constant.py index d91fe14..c1efcc0 100644 --- a/common/Constant.py +++ b/common/Constant.py @@ -80,7 +80,7 @@ class ComicPath: PROGRESS_PATH = "progress" ICONS_PATH = "icons" COMIC_INFO_XML = "ComicInfo.xml" - TIME_SLEEP = 0 + TIME_SLEEP = 0.5 #顶级路径 @classmethod diff --git a/utils/ComicUtils.py b/utils/ComicUtils.py index ae0fe4c..37898bb 100644 --- a/utils/ComicUtils.py +++ b/utils/ComicUtils.py @@ -136,7 +136,6 @@ class CBZUtils: if path == None: path = cls.getCBZ_Path() #文件不存在 则返回 if fu.notExists(path): return False - ComicPath.TIME_SLEEP = 0.1 if list_img == None: list_img = Comic.getChapterImgs() if ciUtils.isProgressDone():