From 0d5e26662f2197e6817685512bde199058c8cc37 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Sun, 9 Feb 2025 20:39:37 +0800 Subject: [PATCH] remove_old_chapter --- src/sites/base.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sites/base.py b/src/sites/base.py index f67e9a9..583af79 100644 --- a/src/sites/base.py +++ b/src/sites/base.py @@ -91,18 +91,9 @@ class BaseSite(ABC): down_chapter = [] for chapter in list_chapter: cbz_path = FileNaming.chapter_cbz(manga_info=manga_info,chapter=chapter) - old_cbz_path = FileNaming.old_chapter_cbz(manga_info=manga_info,chapter=chapter) if os.path.exists(cbz_path): logger.debug(f"{chapter.title} 章节已存在") chapter.status = "downloaded" - if os.path.exists(old_cbz_path): - logger.debug(f"{chapter.title} Old章节存在") - if not os.path.exists(os.path.dirname(cbz_path)): os.makedirs(cbz_path) - CBZUtils()._clean_old_cbz(old_cbz_path) - if os.path.exists(old_cbz_path): - shutil.copy(old_cbz_path, cbz_path) - logger.info(f"{old_cbz_path} ==> {cbz_path} 已复制") - chapter.status = "downloaded" down_chapter.append(chapter) return down_chapter except Exception as e: