diff --git a/utils/comic/ComicInfo.py b/utils/comic/ComicInfo.py index ae2f824..c71234a 100644 --- a/utils/comic/ComicInfo.py +++ b/utils/comic/ComicInfo.py @@ -293,12 +293,14 @@ class comicInfo(): @classmethod def getNewCBZComicChapter(cls): - c_path = cls.getDirCBZComicChapter() - s_path = cls.getSortDirCBZComicChapter() + c_dir = cls.getDirCBZComicChapter() + s_dir = cls.getSortDirCBZComicChapter() + c_path = cls.getDirCBZComicChapter()+".CBZ" + s_path = cls.getSortDirCBZComicChapter()+".CBZ" if os.path.exists(c_path) and s_path != None: shutil.move(c_path, s_path) print("文件已移动至:", s_path) - return s_path + return s_dir @classmethod def getDirComic(cls): diff --git a/utils/entity/BaseComicEntity.py b/utils/entity/BaseComicEntity.py index 02e8100..5fff72c 100644 --- a/utils/entity/BaseComicEntity.py +++ b/utils/entity/BaseComicEntity.py @@ -34,7 +34,11 @@ class baseComic: for chapter in chapters: comicInfo.setChapterIndex(chapter_index) comicInfo.setChapterName(chapter) - comicInfo.getNewCBZComicChapter() + c_img_path = comicInfo.getDirCBZComicChapter()+".jpg" + s_img_path = comicInfo.getNewCBZComicChapter()+".jpg" + if os.path.exists(c_img_path): + shutil.move(s_img_path) + print(f"已从{c_img_path}移至:{s_img_path}") chapter_index = chapter_index + 1 return None