This commit is contained in:
caiwx86 2023-04-06 16:25:35 +08:00
parent 3c74f84ca4
commit 1c912b72c4
2 changed files with 7 additions and 5 deletions

View File

@ -136,10 +136,10 @@ class baseComic:
ci.writeJson()
#验证数据是已存在且是否完整
is_next = CBZUtils.nextCBZ()
is_old=CBZUtils.updateOldCBZ()
is_update_old=CBZUtils.isUpdateOldCBZ()
#不存在ComicInfo.xml则生成
if is_next and fu.notExists(ComicPath.getPathComicInfoXML()): ci.writeComicInfoXML()
if not is_next and is_old:
if not is_next and not is_update_old:
ComicPath.TIME_SLEEP = 0.5
downloadUtils.queueDownClear()
else:

View File

@ -154,7 +154,9 @@ class CBZUtils:
return False
@classmethod
def updateOldCBZ(cls,filesname=None,result=False):
def isUpdateOldCBZ(cls,filesname=None,result=False):
#数据损坏则为 True
is_update = True
if filesname == None: filesname = Comic.getChapterFilesName()
old_zipfile_path = ComicPath.getPathOldCBZComicChapter()
@ -173,9 +175,9 @@ class CBZUtils:
#检验图片损坏则删除
if file.endswith(".jpg") and not fu.ver_file(os.path.join(unzip_path,file),type="image"):
fu.remove(unzip_path)
return False
return True
ci.writeComicInfoXML(overlay=True)
result = True
result = False
return result
@classmethod