fix
This commit is contained in:
parent
3c74f84ca4
commit
1c912b72c4
@ -136,10 +136,10 @@ class baseComic:
|
|||||||
ci.writeJson()
|
ci.writeJson()
|
||||||
#验证数据是已存在且是否完整
|
#验证数据是已存在且是否完整
|
||||||
is_next = CBZUtils.nextCBZ()
|
is_next = CBZUtils.nextCBZ()
|
||||||
is_old=CBZUtils.updateOldCBZ()
|
is_update_old=CBZUtils.isUpdateOldCBZ()
|
||||||
#不存在ComicInfo.xml则生成
|
#不存在ComicInfo.xml则生成
|
||||||
if is_next and fu.notExists(ComicPath.getPathComicInfoXML()): ci.writeComicInfoXML()
|
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
|
ComicPath.TIME_SLEEP = 0.5
|
||||||
downloadUtils.queueDownClear()
|
downloadUtils.queueDownClear()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -154,7 +154,9 @@ class CBZUtils:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@classmethod
|
@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()
|
if filesname == None: filesname = Comic.getChapterFilesName()
|
||||||
old_zipfile_path = ComicPath.getPathOldCBZComicChapter()
|
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"):
|
if file.endswith(".jpg") and not fu.ver_file(os.path.join(unzip_path,file),type="image"):
|
||||||
fu.remove(unzip_path)
|
fu.remove(unzip_path)
|
||||||
return False
|
return True
|
||||||
ci.writeComicInfoXML(overlay=True)
|
ci.writeComicInfoXML(overlay=True)
|
||||||
result = True
|
result = False
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user