fix:修复馒头消息统计

This commit is contained in:
jxxghp
2024-04-23 10:52:59 +08:00
parent bb5c96c2ee
commit c071088952
4 changed files with 8 additions and 3 deletions

View File

@@ -21,11 +21,12 @@
"SiteStatistic": {
"name": "站点数据统计",
"description": "自动统计和展示站点数据。",
"version": "2.7",
"version": "2.8",
"icon": "statistic.png",
"author": "lightolly",
"level": 2,
"history": {
"v2.8": "修复馒头未读消息统计",
"v2.7": "修复憨憨种子信息只统计第一页的问题,增加移除失效统计选项",
"v2.6": "支持馒头新架构数据统计"
}

View File

@@ -43,7 +43,7 @@ class SiteStatistic(_PluginBase):
# 插件图标
plugin_icon = "statistic.png"
# 插件版本
plugin_version = "2.7"
plugin_version = "2.8"
# 插件作者
plugin_author = "lightolly"
# 作者主页

View File

@@ -217,6 +217,9 @@ class ISiteUserInfo(metaclass=ABCMeta):
msg_links
)
unread_msg_links.extend(msg_links)
# 重新更新未读消息数99999表示有消息但数量未知
if self.message_unread == 99999:
self.message_unread = len(unread_msg_links)
# 解析未读消息内容
for msg_link in unread_msg_links:
logger.debug(f"{self.site_name} 信息链接 {msg_link}")

View File

@@ -102,7 +102,8 @@ class MTorrentSiteUserInfo(ISiteUserInfo):
self.download = int(user_info.get("memberCount", {}).get("downloaded") or '0')
self.ratio = user_info.get("memberCount", {}).get("shareRate") or 0
self.bonus = user_info.get("memberCount", {}).get("bonus") or 0
self.message_unread = 1
# 需要解析消息,但不确定消息条数
self.message_unread = 99999
self._torrent_seeding_params = {
"pageNumber": 1,