This commit is contained in:
cwx
2023-04-07 10:26:46 +08:00
parent ab6ea5b476
commit da76a2ce17
4 changed files with 28 additions and 4 deletions
+6
View File
@@ -11,6 +11,7 @@ from common.ComicInfo import ComicInfo as ci
from common.Comic import Comic
from common.Comic import ListComic
from common.Constant import ComicPath
from utils.FileUtils import fileUtils
#中心框架
class baseComic:
@@ -68,6 +69,11 @@ class baseComic:
#存在完成配置文件 但文件不存在 将清空完成配置文件
#if ciUtils.isProgressDone() and fu.notExists(ComicPath.getNewCBZComicChapter("file")):
# ciUtils.setProgressFail()
cbz_path = ComicPath.getPathCBZComicChapter()
if fileUtils.getModificationDateYMD(cbz_path,not_exists="20101010") > 20230405:
os.remove(cbz_path)
print(f"已删除CBZ, {cbz_path}")
ciUtils.setProgressFail()
#不存在完成配置文件 则允许下载
if not ciUtils.isProgressDone():
#if fu.exists(ComicPath.getNewCBZComicChapter("file")): ciUtils.setProgressDone()
+2
View File
@@ -140,6 +140,8 @@ class ComicPath:
def getPathOldOriginCBZComicChapter(cls): return cls.setDirOld([Comic.getOriginComicName(),Comic.getOriginChapterName()],suffix="CBZ")
@classmethod
def getPathOldCBZComicChapter(cls): return cls.setDirOld([Comic.getComicName(),Comic.getChapterName()],suffix="CBZ")
@classmethod
def getPathCBZComicChapter(cls): return cls.setDirCBZ([Comic.getComicName(),Comic.getChapterName()],suffix="CBZ")
#排序
@classmethod
def getSortDirCBZComicChapter(cls): return cls.setDirCBZ([Comic.getComicName()],str(Comic.getNumber())+" "+Comic.getChapterName())