fix
This commit is contained in:
1 parent
9578c6d8bb
commit
fd8d056105
1 file changed
+7
-5
@@ -102,8 +102,9 @@ class comicEntity:
|
|||||||
'''
|
'''
|
||||||
@classmethod
|
@classmethod
|
||||||
def comicChapter(cls,chapter_url,scramble=None,sleep=None):
|
def comicChapter(cls,chapter_url,scramble=None,sleep=None):
|
||||||
|
is_next = True
|
||||||
try:
|
try:
|
||||||
cls.Onechapter(chapter_url,scramble)
|
is_next = cls.Onechapter(chapter_url,scramble)
|
||||||
#进入下个阶段
|
#进入下个阶段
|
||||||
if comicInfo.nextExistsGetPath("down_"):
|
if comicInfo.nextExistsGetPath("down_"):
|
||||||
#章节图片全部下载后,调用下载封面
|
#章节图片全部下载后,调用下载封面
|
||||||
@@ -123,7 +124,7 @@ class comicEntity:
|
|||||||
shutil.rmtree(dirComicChapter)
|
shutil.rmtree(dirComicChapter)
|
||||||
cls.comicChapter(chapter_url,scramble,sleep)
|
cls.comicChapter(chapter_url,scramble,sleep)
|
||||||
ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(comicInfo.getLenChapters()))
|
ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(comicInfo.getLenChapters()))
|
||||||
if sleep != None:
|
if sleep != None and is_next == True:
|
||||||
ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节")
|
ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节")
|
||||||
time.sleep(sleep)
|
time.sleep(sleep)
|
||||||
|
|
||||||
@@ -132,7 +133,7 @@ class comicEntity:
|
|||||||
def Onechapter(cls,chapter_url,scramble=None):
|
def Onechapter(cls,chapter_url,scramble=None):
|
||||||
if not str(chapter_url).startswith("http"):
|
if not str(chapter_url).startswith("http"):
|
||||||
chapter_url = comicInfo.getBaseUrl() + chapter_url
|
chapter_url = comicInfo.getBaseUrl() + chapter_url
|
||||||
cls.comicChapterDownload(chapter_url)
|
is_next = cls.comicChapterDownload(chapter_url)
|
||||||
comicInfo.nextInfoToImgChapter()
|
comicInfo.nextInfoToImgChapter()
|
||||||
#下载完成后, 开始解密图片
|
#下载完成后, 开始解密图片
|
||||||
if scramble:
|
if scramble:
|
||||||
@@ -146,7 +147,7 @@ class comicEntity:
|
|||||||
imageUtils.getScrambleImage(c_path)
|
imageUtils.getScrambleImage(c_path)
|
||||||
#进入下一阶段
|
#进入下一阶段
|
||||||
comicInfo.nextImgToDownloadChapter()
|
comicInfo.nextImgToDownloadChapter()
|
||||||
|
return is_next
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def comicChapterDownload(cls,chapter_url):
|
def comicChapterDownload(cls,chapter_url):
|
||||||
@@ -223,4 +224,5 @@ class comicEntity:
|
|||||||
except:
|
except:
|
||||||
ntfy(f"删除失败 {cbz_path}")
|
ntfy(f"删除失败 {cbz_path}")
|
||||||
if is_next:
|
if is_next:
|
||||||
return download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
||||||
|
return is_next
|
||||||
Reference in new issue
Block a user