add notification link
This commit is contained in:
@ -89,7 +89,8 @@ class DownloadChain(ChainBase):
|
||||
title=f"{mediainfo.title_year} "
|
||||
f"{'%s %s' % (meta.season, download_episodes) if download_episodes else meta.season_episode} 开始下载",
|
||||
text=msg_text,
|
||||
image=mediainfo.get_message_image()))
|
||||
image=mediainfo.get_message_image(),
|
||||
link=settings.MP_DOMAIN('/#/downloading')))
|
||||
|
||||
def download_torrent(self, torrent: TorrentInfo,
|
||||
channel: MessageChannel = None,
|
||||
@ -841,7 +842,9 @@ class DownloadChain(ChainBase):
|
||||
channel=channel,
|
||||
mtype=NotificationType.Download,
|
||||
title="没有正在下载的任务!",
|
||||
userid=userid))
|
||||
userid=userid,
|
||||
link=settings.MP_DOMAIN('#/downloading')
|
||||
))
|
||||
return
|
||||
# 发送消息
|
||||
title = f"共 {len(torrents)} 个任务正在下载:"
|
||||
@ -853,8 +856,13 @@ class DownloadChain(ChainBase):
|
||||
f"{round(torrent.progress, 1)}%")
|
||||
index += 1
|
||||
self.post_message(Notification(
|
||||
channel=channel, mtype=NotificationType.Download,
|
||||
title=title, text="\n".join(messages), userid=userid))
|
||||
channel=channel,
|
||||
mtype=NotificationType.Download,
|
||||
title=title,
|
||||
text="\n".join(messages),
|
||||
userid=userid,
|
||||
link=settings.MP_DOMAIN('#/downloading')
|
||||
))
|
||||
|
||||
def downloading(self) -> List[DownloadingTorrent]:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user