From b9a55a834435c36d105de0f3b075ae84459ebf7a Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Wed, 5 Apr 2023 09:36:06 +0800 Subject: [PATCH] ntfy.sendMsg alert True --- common/BaseComicEntity.py | 2 +- utils/ComicUtils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/BaseComicEntity.py b/common/BaseComicEntity.py index 9c4c33a..a8e49f6 100644 --- a/common/BaseComicEntity.py +++ b/common/BaseComicEntity.py @@ -94,7 +94,7 @@ class baseComic: #except Exception as e: is_next = ntfy.sendMsg(f"{ci.getComicName()} 下载出错了",error=e) ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(Comic.getLenChapters())) Comic.setNumber(cls.count_chapter + 1) - if sleep != None and is_next: ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节",sleep=sleep) + if sleep != None and is_next: ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节",alert=True,sleep=sleep) #根据章节地址下载全部图片,并将文件名scramble开头的图片进行解密 @classmethod diff --git a/utils/ComicUtils.py b/utils/ComicUtils.py index 1fb1178..5ec07dc 100644 --- a/utils/ComicUtils.py +++ b/utils/ComicUtils.py @@ -12,7 +12,7 @@ from utils.OldUtils import OldUtils class ntfy: @classmethod - def sendMsg(cls, msg,alert=True,sleep=None,error=None): + def sendMsg(cls, msg,alert=False,sleep=None,error=None): try: print(f"#ntfy: {msg}") if alert: @@ -139,10 +139,10 @@ class CBZUtils: if list_img == None: list_img = Comic.getChapterImgs() if ciUtils.isProgressDone(): - print(f"该文件已校验成功,跳过中... {path}") + ntfy.sendMsg(f"该文件已校验成功,跳过中... {path}",alert=True) return True if fu.exists(path) and len(cls.zip_info(path)) == len(list_img): - print(f"文件校验成功:{path}") + ntfy.sendMsg(f"文件校验成功:{path}",alert=True) ciUtils.setProgressDone() return True else: