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