This commit is contained in:
caiwx86 2023-04-01 15:15:16 +08:00
parent 936aaf1a59
commit b19164d17b
2 changed files with 5 additions and 3 deletions

View File

@ -149,7 +149,9 @@ class CBZUtils:
print("文件校验中...")
for file in os.listdir(unzip_path):
#检验图片损坏则删除
if file.endswith(".jpg") and not fu.ver_file(os.path.join(unzip_path,file),type="image"): fu.remove(unzip_path)
if file.endswith(".jpg") and not fu.ver_file(os.path.join(unzip_path,file),type="image"):
fu.remove(unzip_path)
return False
comicInfo.writeComicInfoXML(overlay=True)
result = True
return result

View File

@ -119,12 +119,12 @@ class baseComic:
ci.getNewIconComicChapter()
#检验CBZ文件
CBZUtils.verCBZComic(cbz_file)
CBZUtils.updateOldCBZ(files_name)
is_next = CBZUtils.nextCBZ()
is_old=CBZUtils.updateOldCBZ(files_name)
#不存在ComicInfo.xml则生成
if is_next and fu.notExists(ci.getPathComicInfoXML()): ci.writeComicInfoXML(chapter_name)
repeat = 1
while is_next and repeat <= 10:
while is_next and repeat <= 10 and is_old:
ntfy.sendMsg(f"{book_name} {chapter_name} 下载中")
download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=None,timeout=8)
is_next = fu.equImages(ci.getDirComicChapter(),list_img)