feat: 支持刷新后触发插件事件

This commit is contained in:
InfinityPacer
2024-06-03 19:32:36 +08:00
parent 2511a6428f
commit 7df3767820
2 changed files with 8 additions and 2 deletions

View File

@@ -30,11 +30,12 @@
"name": "站点数据统计",
"description": "自动统计和展示站点数据。",
"labels": "站点,仪表板",
"version": "3.5",
"version": "3.6",
"icon": "statistic.png",
"author": "lightolly",
"level": 2,
"history": {
"v3.6": "支持站点数据统计刷新后触发插件事件",
"v3.5": "站点数据统计支持YemaPT",
"v3.4": "修复馒头站点数据统计",
"v3.3": "支持选择仪表板组件规格",

View File

@@ -43,7 +43,7 @@ class SiteStatistic(_PluginBase):
# 插件图标
plugin_icon = "statistic.png"
# 插件版本
plugin_version = "3.5"
plugin_version = "3.6"
# 插件作者
plugin_author = "lightolly"
# 作者主页
@@ -1440,6 +1440,11 @@ class SiteStatistic(_PluginBase):
# 更新时间
self.save_data("last_update_time", today_date)
self.eventmanager.send_event(etype=EventType.PluginAction, data={
"action": "sitestatistic_refresh_complete"
})
logger.info("站点数据刷新完成")
def __custom_sites(self) -> List[Any]: