fix 多通知Bug
This commit is contained in:
@ -182,14 +182,14 @@ class SlackModule(_ModuleBase):
|
||||
return None
|
||||
|
||||
@checkMessage(MessageChannel.Slack)
|
||||
def post_message(self, message: Notification) -> Optional[bool]:
|
||||
def post_message(self, message: Notification) -> None:
|
||||
"""
|
||||
发送消息
|
||||
:param message: 消息
|
||||
:return: 成功或失败
|
||||
"""
|
||||
return self.slack.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
self.slack.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
|
||||
@checkMessage(MessageChannel.Slack)
|
||||
def post_medias_message(self, message: Notification, medias: List[MediaInfo]) -> Optional[bool]:
|
||||
|
@ -90,14 +90,14 @@ class TelegramModule(_ModuleBase):
|
||||
return None
|
||||
|
||||
@checkMessage(MessageChannel.Telegram)
|
||||
def post_message(self, message: Notification) -> Optional[bool]:
|
||||
def post_message(self, message: Notification) -> None:
|
||||
"""
|
||||
发送消息
|
||||
:param message: 消息体
|
||||
:return: 成功或失败
|
||||
"""
|
||||
return self.telegram.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
self.telegram.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
|
||||
@checkMessage(MessageChannel.Telegram)
|
||||
def post_medias_message(self, message: Notification, medias: List[MediaInfo]) -> Optional[bool]:
|
||||
|
@ -271,11 +271,11 @@ class TmdbScraper:
|
||||
# 添加时间
|
||||
DomUtils.add_node(doc, root, "dateadded", time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
|
||||
# TMDBID
|
||||
uniqueid = DomUtils.add_node(doc, root, "uniqueid", tmdbid)
|
||||
uniqueid = DomUtils.add_node(doc, root, "uniqueid", str(tmdbid))
|
||||
uniqueid.setAttribute("type", "tmdb")
|
||||
uniqueid.setAttribute("default", "true")
|
||||
# tmdbid
|
||||
DomUtils.add_node(doc, root, "tmdbid", tmdbid)
|
||||
DomUtils.add_node(doc, root, "tmdbid", str(tmdbid))
|
||||
# 标题
|
||||
DomUtils.add_node(doc, root, "title", episodeinfo.get("name") or "第 %s 集" % episode)
|
||||
# 简介
|
||||
|
@ -114,14 +114,14 @@ class WechatModule(_ModuleBase):
|
||||
return None
|
||||
|
||||
@checkMessage(MessageChannel.Wechat)
|
||||
def post_message(self, message: Notification) -> Optional[bool]:
|
||||
def post_message(self, message: Notification) -> None:
|
||||
"""
|
||||
发送消息
|
||||
:param message: 消息内容
|
||||
:return: 成功或失败
|
||||
"""
|
||||
return self.wechat.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
self.wechat.send_msg(title=message.title, text=message.text,
|
||||
image=message.image, userid=message.userid)
|
||||
|
||||
@checkMessage(MessageChannel.Wechat)
|
||||
def post_medias_message(self, message: Notification, medias: List[MediaInfo]) -> Optional[bool]:
|
||||
|
Reference in New Issue
Block a user