From f5a61ceff1b66b2c597736f0b8bf2b724c6a5f5a Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 27 Sep 2023 13:40:35 +0800 Subject: [PATCH] fix bug --- app/plugins/brushflow/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/plugins/brushflow/__init__.py b/app/plugins/brushflow/__init__.py index 3c355340..6f1d557e 100644 --- a/app/plugins/brushflow/__init__.py +++ b/app/plugins/brushflow/__init__.py @@ -1767,19 +1767,22 @@ class BrushFlow(_PluginBase): """ 发送删除种子的消息 """ - if self._notify: - self.chain.post_message(Notification( - mtype=NotificationType.SiteMessage, - title=f"【刷流任务删种】", - text=f"站点:{site_name}\n" - f"标题:{torrent_title}\n" - f"原因:{reason}" - )) + if not self._notify: + return + self.chain.post_message(Notification( + mtype=NotificationType.SiteMessage, + title=f"【刷流任务删种】", + text=f"站点:{site_name}\n" + f"标题:{torrent_title}\n" + f"原因:{reason}" + )) def __send_add_message(self, torrent: TorrentInfo): """ 发送添加下载的消息 """ + if not self._notify: + return msg_text = "" if torrent.site_name: msg_text = f"站点:{torrent.site_name}"