fix 多通知Bug

This commit is contained in:
jxxghp
2023-08-22 13:43:10 +08:00
parent 0cc104ef11
commit b831d71bf7
10 changed files with 17 additions and 22 deletions

View File

@ -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]:

View File

@ -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]:

View File

@ -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)
# 简介

View File

@ -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]: