add download queue

This commit is contained in:
cwx
2023-04-01 19:50:39 +08:00
parent f907258d78
commit badb0529c0
2 changed files with 44 additions and 36 deletions
+7 -7
View File
@@ -124,11 +124,11 @@ class baseComic:
#不存在ComicInfo.xml则生成
if is_next and fu.notExists(ci.getPathComicInfoXML()): ci.writeComicInfoXML(chapter_name)
repeat = 1
while is_next and repeat <= 10 and not is_old:
ntfy.sendMsg(f"{book_name} {chapter_name} 下载中")
download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=None,timeout=8)
ntfy.sendMsg("等待数据检验中...",sleep=0.5)
is_next = fu.equImages(ci.getDirComicChapter(),list_img)
if not is_next: ntfy.sendMsg(msg=f"下载数据(不完整,{int(repeat*2)}秒钟后尝试第{repeat}",sleep=int(repeat*2))
repeat += 1
#while is_next and repeat <= 10 and not is_old:
# ntfy.sendMsg(f"{book_name} {chapter_name} 下载中")
download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=None,timeout=8)
# ntfy.sendMsg("等待数据检验中...",sleep=0.5)
is_next = fu.equImages(ci.getDirComicChapter(),list_img)
# if not is_next: ntfy.sendMsg(msg=f"下载数据(不完整,{int(repeat*2)}秒钟后尝试第{repeat}次",sleep=int(repeat*2))
# repeat += 1
return is_next