fix
This commit is contained in:
1 parent
91f0b17e95
commit
b6c188ecc2
1 file changed
+13
-14
@@ -123,20 +123,19 @@ class baseComic:
|
|||||||
if os.path.exists(cbz_path): CBZUtils.verCBZComic(cbz_path)
|
if os.path.exists(cbz_path): CBZUtils.verCBZComic(cbz_path)
|
||||||
|
|
||||||
is_unzip = CBZUtils.existsUnzipCBZ(files_name)
|
is_unzip = CBZUtils.existsUnzipCBZ(files_name)
|
||||||
if is_next:
|
if is_next and not os.path.exists(ci.getPathComicInfoXML()):
|
||||||
if not os.path.exists(ci.getPathComicInfoXML()):
|
|
||||||
#print("不存在ComicInfo.xml 生成中...")
|
#print("不存在ComicInfo.xml 生成中...")
|
||||||
ci.setPages(files_name)
|
ci.setPages(files_name)
|
||||||
ci.writeComicInfoXML(chapter_name)
|
ci.writeComicInfoXML(chapter_name)
|
||||||
|
is_next = CBZUtils.nextCBZ(list_img)
|
||||||
|
repeat = 1
|
||||||
|
while is_next and repeat <= 2 and not is_unzip:
|
||||||
ntfy.sendMsg(f"{book_name} {chapter_name} 下载中")
|
ntfy.sendMsg(f"{book_name} {chapter_name} 下载中")
|
||||||
is_next = CBZUtils.nextCBZ(list_img)
|
download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=10,timeout=60)
|
||||||
repeat = 1
|
equ_next = len(",".join(os.listdir(ci.getDirComicChapter())).split(".jpg"))-1 == len(list_img)
|
||||||
while is_next and repeat <= 2 and not is_unzip:
|
if not equ_next:
|
||||||
download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=10,timeout=60)
|
sleep_time = 3+int(repeat)*2
|
||||||
equ_next = len(",".join(os.listdir(ci.getDirComicChapter())).split(".jpg"))-1 == len(list_img)
|
time.sleep(sleep_time)
|
||||||
if not equ_next:
|
ntfy.sendMsg(f"下载数据(不完整,{sleep_time}秒钟后尝试第{repeat}次")
|
||||||
sleep_time = 3+int(repeat)*2
|
repeat += 1
|
||||||
time.sleep(sleep_time)
|
|
||||||
ntfy.sendMsg(f"下载数据(不完整,{sleep_time}秒钟后尝试第{repeat}次")
|
|
||||||
repeat += 1
|
|
||||||
return is_next
|
return is_next
|
||||||
Reference in new issue
Block a user