Compare commits

...

2 Commits

Author SHA1 Message Date
ab6ea5b476 fix 2023-04-07 08:54:29 +08:00
c2100100b5 fix 2023-04-07 08:49:49 +08:00
3 changed files with 11 additions and 6 deletions

View File

@ -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())

View File

@ -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},解压中...")

View File

@ -186,10 +186,11 @@ class downloadUtils:
def common_download(cls,file_url,dir,file,file_type,repair_max=15,timeout=10,proxy=None,proxy_type=None):
logger.debug(f"file_url={file_url}, dir={dir} , file={file}, file_type={file_type}")
en_scrabmle_file = ComicPath.getFileScrambleImageSave(file)
save_path = os.path.join(dir,en_scrabmle_file)
en_scrabmle_path = os.path.join(dir,en_scrabmle_file)
save_path = os.path.join(dir,file)
logger.debug(f"save_path= {save_path}")
if os.path.exists(save_path):
logger.info(f"文件已存在,跳过中... {save_path}")
if os.path.exists(en_scrabmle_path):
logger.info(f"文件已存在,跳过中... {en_scrabmle_path}")
return True
if file_url == None:
logger.error("common_down file_url 为空")