fix
This commit is contained in:
parent
0f436e10c4
commit
f99b37a66b
@ -235,11 +235,22 @@ class comicEntity:
|
|||||||
except:
|
except:
|
||||||
ntfy(f"删除失败 {cbz_path}")
|
ntfy(f"删除失败 {cbz_path}")
|
||||||
if is_next:
|
if is_next:
|
||||||
pathComicInfo = comicInfo.getPathComicInfoXML()
|
path_comic_info = comicInfo.getPathComicInfoXML()
|
||||||
if not os.path.exists(pathComicInfo):
|
if not os.path.exists(path_comic_info):
|
||||||
#print("不存在ComicInfo.xml 生成中...")
|
#print("不存在ComicInfo.xml 生成中...")
|
||||||
comicInfo.setPages(list_fileName)
|
comicInfo.setPages(list_fileName)
|
||||||
comicInfo.writeComicInfoXML(chapterName)
|
comicInfo.writeComicInfoXML(chapterName)
|
||||||
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
||||||
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
is_next = verUtils.verNextCBZ(list_img)
|
||||||
|
repeat = 0
|
||||||
|
while not is_next or repeat <= 3:
|
||||||
|
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName,timeout=180)
|
||||||
|
file_imgs = os.listdir(comicInfo.getDirComicChapter())
|
||||||
|
count_jpg = ",".join(file_imgs).split(".jpg")
|
||||||
|
is_next = len(count_jpg)-1 == len(list_img)
|
||||||
|
if not is_next:
|
||||||
|
sleep_time = 3+int(repeat)*2
|
||||||
|
time.sleep(sleep_time)
|
||||||
|
ntfy.sendMsg(f"下载数据({len(count_jpg)-1}/{len(list_img)})不完整,{sleep_time}秒钟后尝试第{repeat}次")
|
||||||
|
repeat += 1
|
||||||
return is_next
|
return is_next
|
||||||
Loading…
Reference in New Issue
Block a user