fix
This commit is contained in:
parent
e9875d34e8
commit
69a3a75808
@ -154,26 +154,6 @@ class comicEntity:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def comicChapterDownload(cls,chapter_url):
|
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)
|
x = cls.baseComicData(chapter_url)
|
||||||
bookName = x.get("bookName")
|
bookName = x.get("bookName")
|
||||||
chapterName = x.get("chapterName")
|
chapterName = x.get("chapterName")
|
||||||
@ -203,8 +183,8 @@ class comicEntity:
|
|||||||
except:
|
except:
|
||||||
htmlUtils.remove_HtmlCache(chapter_url)
|
htmlUtils.remove_HtmlCache(chapter_url)
|
||||||
htmlUtils.remove_HtmlCache(chapterAPIUrl)
|
htmlUtils.remove_HtmlCache(chapterAPIUrl)
|
||||||
ntfy.sendMsg("存在错误,请退出后尝试")
|
ntfy.sendMsg("存在错误,尝试中")
|
||||||
exit()
|
cls.comicChapterDownload(chapter_url)
|
||||||
if images == None:
|
if images == None:
|
||||||
ntfy.sendMsg(f"未获取到章节图像 comic_name={bookName} chapter={chapterName}")
|
ntfy.sendMsg(f"未获取到章节图像 comic_name={bookName} chapter={chapterName}")
|
||||||
|
|
||||||
@ -232,7 +212,25 @@ class comicEntity:
|
|||||||
comicInfo.setChapterImgs(list_img)
|
comicInfo.setChapterImgs(list_img)
|
||||||
#保存图像
|
#保存图像
|
||||||
comicInfo.nextSaveInfoChapter(chapterName, 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文件后重试")
|
||||||
|
htmlUtils.remove_HtmlCache(chapter_url)
|
||||||
|
try:
|
||||||
|
ntfy.sendMsg(f"删除 {cbz_path}")
|
||||||
|
os.remove(cbz_path)
|
||||||
|
except:
|
||||||
|
ntfy(f"删除失败 {cbz_path}")
|
||||||
if is_next:
|
if is_next:
|
||||||
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
||||||
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user