fix
This commit is contained in:
parent
b70fe6c79d
commit
3c8d44f909
@ -16,21 +16,6 @@ class CBZUtils:
|
||||
@classmethod
|
||||
def getCBZ_Path(cls): return cls.getCBZ_Dir()+".CBZ"
|
||||
|
||||
@classmethod
|
||||
def PackCBZAndequZipLength(cls):
|
||||
try:
|
||||
size_zip = len(cls.zip_compression(comicInfo.getDirComicChapter(), cls.getCBZ_Path()))
|
||||
size_imgs = len(comicInfo.getChapterImgs())
|
||||
if size_zip == size_imgs:
|
||||
ntfy.sendMsg(f"打包校验成功: {cls.getCBZ_Path()}")
|
||||
comicInfo.nextCBZToDoneChapter()
|
||||
return True
|
||||
else:
|
||||
ntfy.sendMsg(f"打包检验不完整:{cls.getCBZ_Path()}")
|
||||
return False
|
||||
except:
|
||||
print("CBZ打包ERROR")
|
||||
|
||||
@classmethod
|
||||
def readDirsOrFiles(cls,dir,type):
|
||||
data = []
|
||||
@ -88,7 +73,8 @@ class CBZUtils:
|
||||
cls.zip_compression(comicInfo.getDirComicChapter(), cls.getCBZ_Path())
|
||||
time.sleep(0.1)
|
||||
fileUtils.remove(comicInfo.getDirComicChapter())
|
||||
return cls.PackCBZAndequZipLength()
|
||||
cls.zip_compression(comicInfo.getDirComicChapter(), cls.getCBZ_Path())
|
||||
verUtils.verNextCBZ()
|
||||
|
||||
@classmethod
|
||||
def replaceZip(cls,filepath,unpack_dir=None):
|
||||
@ -143,8 +129,10 @@ class CBZUtils:
|
||||
|
||||
class verUtils:
|
||||
@classmethod
|
||||
def verNextCBZ(cls,list_img):
|
||||
def verNextCBZ(cls,list_img=None):
|
||||
#验证数据是已存在且是否完整
|
||||
if list_img == None:
|
||||
comicInfo.getChapterImgs()
|
||||
cbz_path = CBZUtils.getCBZ_Path()
|
||||
is_next = False
|
||||
if os.path.exists(cbz_path):
|
||||
@ -153,7 +141,7 @@ class verUtils:
|
||||
except:
|
||||
cbz_size = 0
|
||||
if len(list_img) == cbz_size:
|
||||
ntfy.sendMsg(f"{comicInfo.getComicName()} {comicInfo.getChapter()} 数据完整,已跳过")
|
||||
ntfy.sendMsg(f"{comicInfo.getComicName()} {comicInfo.getChapter()} 数据完整")
|
||||
is_next = True
|
||||
else:
|
||||
ntfy.sendMsg(f"{comicInfo.getComicName()} {comicInfo.getChapter()} 数据不完整,尝试删除配置CBZ文件后重试")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user