fix
This commit is contained in:
parent
82a2e8cffe
commit
cffce0f8b7
@ -448,9 +448,12 @@ class comicInfo():
|
||||
cls.nextSavePath("done_",data)
|
||||
|
||||
@classmethod
|
||||
def nextExistsGetPath(cls,msg):
|
||||
def nextExistsGetPath(cls,msg,remove=False):
|
||||
path = cls.nextSavePath(msg)
|
||||
return os.path.exists(path)
|
||||
is_exists = os.path.exists(path)
|
||||
if remove and is_exists:
|
||||
os.remove(path)
|
||||
return is_exists
|
||||
|
||||
@classmethod
|
||||
def saveConfComicData(cls,fileName,data,comicName=None):
|
||||
|
||||
@ -40,6 +40,8 @@ class baseComic:
|
||||
cbz_path = comicInfo.getNewCBZComicChapter("file")
|
||||
comicInfo.getNewIconComicChapter()
|
||||
CBZUtils.replaceZip(cbz_path)
|
||||
if comicInfo.nextExistsGetPath("done_") and not os.path.exists(cbz_path):
|
||||
comicInfo.nextExistsGetPath("done_",remove=True)
|
||||
chapter_index = chapter_index + 1
|
||||
return None
|
||||
|
||||
@ -69,6 +71,8 @@ class baseComic:
|
||||
chapter = chapters[cls.count_chapter]
|
||||
comicInfo.setChapterIndex(cls.count_chapter+1)
|
||||
comicInfo.setChapterName(chapter)
|
||||
if comicInfo.nextExistsGetPath("done_") and not os.path.exists(comicInfo.getNewCBZComicChapter("file")):
|
||||
comicInfo.nextExistsGetPath("done_",remove=True)
|
||||
if not comicInfo.nextExistsGetPath("done_"):
|
||||
cls.comicChapter(href,scramble=True,sleep=random.randint(5,15))
|
||||
#存在就校验CBZ包是否完整
|
||||
|
||||
Loading…
Reference in New Issue
Block a user