This commit is contained in:
caiwx86 2023-04-05 22:09:53 +08:00
parent 3212e5ac43
commit 1e61a38d62

View File

@ -35,26 +35,27 @@ class baseComic:
#添加
Comic.setComicName(book_name)
Comic.setUpdateAt(update_at)
Comic.setCurrentDownLink(None)
if not ciUtils.isUpdateComic():
ntfy.sendMsg(f"开始下载 漫画:{book_name}",alert=True)
Comic.setCurrentDownLink(comic_href)
else:
ntfy.sendMsg(f"{book_name} 已是最新",alert=True)
chapters = htmlUtils.xpathData(chapters_xpath,url=comic_href,update=False)
chapter_index = 1
for chapter in chapters:
Comic.setNumber(chapter_index)
Comic.setChapterName(chapter)
cbz_path = ComicPath.getNewCBZComicChapter("file")
icon_path = ComicPath.getNewIconComicChapter("file")
CBZUtils.replaceZip(cbz_path)
#判断漫画未完成
if ciUtils.isProgressDone() and fu.notExists(cbz_path):
ciUtils.setProgressFail()
ciUtils.updateLastDate("0")
Comic.setCurrentDownLink(comic_href)
chapter_index = chapter_index + 1
return None
#chapters = htmlUtils.xpathData(chapters_xpath,url=comic_href,update=False)
#chapter_index = 1
#for chapter in chapters:
# Comic.setNumber(chapter_index)
# Comic.setChapterName(chapter)
# cbz_path = ComicPath.getNewCBZComicChapter("file")
# icon_path = ComicPath.getNewIconComicChapter("file")
# CBZUtils.replaceZip(cbz_path)
# #判断漫画未完成
# if ciUtils.isProgressDone() and fu.notExists(cbz_path):
# ciUtils.setProgressFail()
# ciUtils.updateLastDate("0")
# Comic.setCurrentDownLink(comic_href)
# chapter_index = chapter_index + 1
#return None
@classmethod
def oneComic(cls,url,title,author,icon,tags,dep,chapters,chapter_href,alias=None,genre=None,lang="zh",age_rating=None,sleep=None):