update
This commit is contained in:
parent
58294db981
commit
b124547f24
@ -214,7 +214,7 @@ class MangaInfo(BaseModel):
|
||||
# 如果章节名称列表长度大于1且最后一个章节名称与传入的章节名称相同
|
||||
if len(cls.chapters_name) > 1 and str_chapter == FileNaming.chinese_file_name(cls.chapters_name[-1]):
|
||||
# 检查状态是否为已完结
|
||||
# if cls.status == "已完结": return True
|
||||
if cls.status == "已完结": return True
|
||||
# 检查章节名称是否包含已完结的关键字
|
||||
str_chapter_key = str_chapter.replace("-", " ").split(" ")
|
||||
# 如果章节名称包含已完结的关键字,则返回True
|
||||
|
||||
@ -87,6 +87,7 @@ class BaseSite(ABC):
|
||||
"""获取章节列表"""
|
||||
try:
|
||||
list_chapter = manga_info.get_list_chapter()
|
||||
is_ended_chapter = False
|
||||
down_chapter = []
|
||||
downloaded_chapter = []
|
||||
number = 0
|
||||
@ -95,7 +96,8 @@ class BaseSite(ABC):
|
||||
cbz_path = FileNaming.chapter_cbz(manga_info=manga_info,chapter=chapter)
|
||||
if os.path.exists(cbz_path):
|
||||
# 判断是否是最新章节
|
||||
if manga_info.is_chapter_ended(chapter.title):
|
||||
is_ended_chapter = manga_info.is_chapter_ended(chapter.title)
|
||||
if is_ended_chapter:
|
||||
# 如果是最新章节且漫画已完结,则不再下
|
||||
# if ci.Count != "" and int(ci.Count) != 0 and int(ci.Count) != int(number):
|
||||
# count = number
|
||||
@ -110,7 +112,7 @@ class BaseSite(ABC):
|
||||
chapter.status = "downloaded"
|
||||
downloaded_chapter.append({ "name" : chapter.title, "status": chapter.status, "path" : cbz_path })
|
||||
down_chapter.append(chapter)
|
||||
if manga_info.status == "已完结":
|
||||
if is_ended_chapter:
|
||||
from src.common.utils import KomgaAPI, MangaUtils
|
||||
is_update_komga_ended = MangaUtils("mangas_ended.json").search_manga(name= manga_info.title)
|
||||
if is_update_komga_ended != None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user