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