From 1a17ea9d17a93994c52b453298b3e18e732efe9a Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Wed, 21 Dec 2022 01:34:08 +0800 Subject: [PATCH] fix --- utils/CBZUtils.py | 7 ++++++- utils/entity/RouMan.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/CBZUtils.py b/utils/CBZUtils.py index 20bb946..08ef280 100644 --- a/utils/CBZUtils.py +++ b/utils/CBZUtils.py @@ -58,8 +58,13 @@ class CBZUtils: try: size_zip = cls.zip_compression(chapter_path,packCBZ_path+".CBZ") size_imgs = len(comicInfo.getChapterImgs()) - if size_zip -1 == size_zip: + if size_zip -1 == size_imgs: ntfy.sendMsg(f"打包校验成功: {packCBZ_path}") + return True + else: + ntfy.sendMsg(f"打包检验不完整:{packCBZ_path}") + return False + except: ntfy.sendMsg("CBZ打包失败") comicInfo.nextCBZToDoneChapter() diff --git a/utils/entity/RouMan.py b/utils/entity/RouMan.py index 3f179ce..cb9c5c2 100644 --- a/utils/entity/RouMan.py +++ b/utils/entity/RouMan.py @@ -119,7 +119,7 @@ class comicEntity: if comicInfo.nextExistsGetPath("cbz_"): time.sleep(1) #下载后自动打包 - CBZUtils.packAutoComicChapterCBZ() + is_next = CBZUtils.packAutoComicChapterCBZ() #完成删除原文件 remove_path = comicInfo.getDirComicChapter() shutil.rmtree(remove_path)