This commit is contained in:
caiwx86 2023-01-15 20:00:55 +08:00
parent 16fa338f12
commit 1e5652744b
2 changed files with 14 additions and 7 deletions

View File

@ -293,10 +293,18 @@ class comicInfo():
@classmethod
def getNewCBZComicChapter(cls):
return cls.getNewToComicChapter(".CBZ")
@classmethod
def getNewIconComicChapter(cls):
return cls.getNewToComicChapter(".jpg")
@classmethod
def getNewToComicChapter(cls,su):
c_dir = cls.getDirCBZComicChapter()
s_dir = cls.getSortDirCBZComicChapter()
c_path = cls.getDirCBZComicChapter()+".CBZ"
s_path = cls.getSortDirCBZComicChapter()+".CBZ"
c_path = cls.getDirCBZComicChapter()+su
s_path = cls.getSortDirCBZComicChapter()+su
if os.path.exists(c_path) and s_path != None:
shutil.move(c_path, s_path)
print("文件已移动至:", s_path)

View File

@ -34,11 +34,8 @@ class baseComic:
for chapter in chapters:
comicInfo.setChapterIndex(chapter_index)
comicInfo.setChapterName(chapter)
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}")
comicInfo.getNewCBZComicChapter()
comicInfo.getNewIconComicChapter()
chapter_index = chapter_index + 1
return None
@ -154,6 +151,8 @@ class baseComic:
#验证数据是已存在且是否完整
#cbz_path = comicInfo.getDirCBZComicChapter()+".CBZ"
cbz_path = comicInfo.getNewCBZComicChapter()+".CBZ"
#更新Icon
comicInfo.getNewIconComicChapter()
is_next = True
if os.path.exists(cbz_path):
try: