feat 分享率低通知预警
This commit is contained in:
parent
08c7fff5ab
commit
f3b12bed20
@ -704,7 +704,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
signin_message += retry_msg
|
signin_message += retry_msg
|
||||||
|
|
||||||
signin_message = "\n".join([f'【{s[0]}】{s[1]}' for s in signin_message if s])
|
signin_message = "\n".join([f'【{s[0]}】{s[1]}' for s in signin_message if s])
|
||||||
self.post_message(title=f"站点自动{type}",
|
self.post_message(title=f"【站点自动{type}】",
|
||||||
mtype=NotificationType.SiteMessage,
|
mtype=NotificationType.SiteMessage,
|
||||||
text=f"全部{type}数量: {len(list(self._sign_sites))} \n"
|
text=f"全部{type}数量: {len(list(self._sign_sites))} \n"
|
||||||
f"本次{type}数量: {len(do_sites)} \n"
|
f"本次{type}数量: {len(do_sites)} \n"
|
||||||
|
@ -966,6 +966,12 @@ class SiteStatistic(_PluginBase):
|
|||||||
# 发送通知,存在未读消息
|
# 发送通知,存在未读消息
|
||||||
self.__notify_unread_msg(site_name, site_user_info, unread_msg_notify)
|
self.__notify_unread_msg(site_name, site_user_info, unread_msg_notify)
|
||||||
|
|
||||||
|
# 分享率接近1时,发送消息提醒
|
||||||
|
if site_user_info.ratio and float(site_user_info.ratio) < 1:
|
||||||
|
self.post_message(mtype=NotificationType.SiteMessage,
|
||||||
|
title=f"【站点分享率低预警】",
|
||||||
|
text=f"站点 {site_user_info.site_name} 分享率 {site_user_info.ratio},请注意!")
|
||||||
|
|
||||||
self._sites_data.update(
|
self._sites_data.update(
|
||||||
{
|
{
|
||||||
site_name: {
|
site_name: {
|
||||||
|
@ -605,7 +605,7 @@ class TorrentRemover(_PluginBase):
|
|||||||
if torrents and message_text and self._notify:
|
if torrents and message_text and self._notify:
|
||||||
self.post_message(
|
self.post_message(
|
||||||
mtype=NotificationType.SiteMessage,
|
mtype=NotificationType.SiteMessage,
|
||||||
title=f"【自动删种任务执行完成】",
|
title=f"【自动删种任务完成】",
|
||||||
text=message_text
|
text=message_text
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user