fix
This commit is contained in:
parent
23799b40a5
commit
e9875d34e8
@ -154,6 +154,26 @@ class comicEntity:
|
||||
|
||||
@classmethod
|
||||
def comicChapterDownload(cls,chapter_url):
|
||||
#验证数据是已存在且是否完整
|
||||
cbz_path = comicInfo.getDirCBZComicChapter()+".CBZ"
|
||||
is_next = True
|
||||
if os.path.exists(cbz_path):
|
||||
try:
|
||||
cbz_size = len(CBZUtils.zip_info(cbz_path)) - 1
|
||||
except:
|
||||
cbz_size = 0
|
||||
if len(list_img) == cbz_size:
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 数据完整,已跳过")
|
||||
is_next = False
|
||||
else:
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 数据不完整,尝试删除配置CBZ文件后重试")
|
||||
htmlUtils.remove_HtmlCache(chapter_url)
|
||||
try:
|
||||
ntfy.sendMsg(f"删除 {cbz_path}")
|
||||
os.remove(cbz_path)
|
||||
except:
|
||||
ntfy(f"删除失败 {cbz_path}")
|
||||
|
||||
x = cls.baseComicData(chapter_url)
|
||||
bookName = x.get("bookName")
|
||||
chapterName = x.get("chapterName")
|
||||
@ -212,24 +232,7 @@ class comicEntity:
|
||||
comicInfo.setChapterImgs(list_img)
|
||||
#保存图像
|
||||
comicInfo.nextSaveInfoChapter(chapterName, list_img)
|
||||
#验证数据是已存在且是否完整
|
||||
cbz_path = comicInfo.getDirCBZComicChapter()+".CBZ"
|
||||
is_next = True
|
||||
if os.path.exists(cbz_path):
|
||||
try:
|
||||
cbz_size = len(CBZUtils.zip_info(cbz_path)) - 1
|
||||
except:
|
||||
cbz_size = 0
|
||||
if len(list_img) == cbz_size:
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 数据完整,已跳过")
|
||||
is_next = False
|
||||
else:
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 数据不完整,尝试删除配置CBZ文件后重试")
|
||||
try:
|
||||
ntfy.sendMsg(f"删除 {cbz_path}")
|
||||
os.remove(cbz_path)
|
||||
except:
|
||||
ntfy(f"删除失败 {cbz_path}")
|
||||
|
||||
if is_next:
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
||||
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user