feat 多通知渠道支持

This commit is contained in:
jxxghp
2023-07-14 13:05:58 +08:00
parent c1e8b6d0ff
commit 6d2f4697b0
22 changed files with 359 additions and 255 deletions

View File

@@ -133,7 +133,6 @@ class Telegram(metaclass=Singleton):
return False
def send_torrents_msg(self, torrents: List[Context],
mediainfo: MediaInfo = None,
userid: str = "", title: str = "") -> Optional[bool]:
"""
发送列表消息
@@ -141,8 +140,12 @@ class Telegram(metaclass=Singleton):
if not self._telegram_token or not self._telegram_chat_id:
return None
if not torrents:
return False
try:
index, caption = 1, "*%s*" % title
mediainfo = torrents[0].media_info
for context in torrents:
torrent = context.torrent_info
site_name = torrent.site_name