From ab6ea5b4768bad9688415f79bcc88dd60446590e Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Fri, 7 Apr 2023 08:54:29 +0800 Subject: [PATCH] fix --- common/Constant.py | 4 +++- utils/ComicUtils.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/Constant.py b/common/Constant.py index d095202..a162a67 100644 --- a/common/Constant.py +++ b/common/Constant.py @@ -137,7 +137,9 @@ class ComicPath: def getPathCBZComicChapterIcon(cls,suffix="jpg",mkdir=True): return cls.setDirCBZ([Comic.getComicName(),Comic.getChapterName()],suffix=suffix,mkdir=mkdir) #旧版本漫画章节CBZ路径 @classmethod - def getPathOldCBZComicChapter(cls): return cls.setDirOld([Comic.getOriginComicName(),Comic.getOriginChapterName()],suffix="CBZ") + 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 getSortDirCBZComicChapter(cls): return cls.setDirCBZ([Comic.getComicName()],str(Comic.getNumber())+" "+Comic.getChapterName()) diff --git a/utils/ComicUtils.py b/utils/ComicUtils.py index b53bedb..3e5f7c4 100644 --- a/utils/ComicUtils.py +++ b/utils/ComicUtils.py @@ -160,8 +160,10 @@ class CBZUtils: #数据损坏则为 True is_update = True if filesname == None: filesname = Comic.getChapterFilesName() - old_zipfile_path = ComicPath.getPathOldCBZComicChapter() - + old_zipfile_path = ComicPath.getPathOldOriginCBZComicChapter() + old_zipfile_path_two = ComicPath.getPathOldCBZComicChapter() + if not fu.exists(old_zipfile_path): old_zipfile_path = old_zipfile_path_two + #判断是否存在已下载CBZ文件 if fu.exists(old_zipfile_path) and fu.notExists(CBZUtils.getCBZ_Path()): print(f"存在CBZ文件{old_zipfile_path},解压中...")