From f34da0b26361c1c62426b09d5ac7c3781b035a7e Mon Sep 17 00:00:00 2001 From: fujie Date: Wed, 11 Feb 2026 11:59:56 +0800 Subject: [PATCH] feat: include per-post download stats in historical snapshots --- scripts/openwebui_stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/openwebui_stats.py b/scripts/openwebui_stats.py index 679ecb2..62f57b7 100644 --- a/scripts/openwebui_stats.py +++ b/scripts/openwebui_stats.py @@ -122,7 +122,7 @@ class OpenWebUIStats: history = self.load_history() today = get_beijing_time().strftime("%Y-%m-%d") - # 构造快照 + # 构造详细快照 (包含每个插件的下载量) snapshot = { "date": today, "total_posts": stats["total_posts"], @@ -131,6 +131,7 @@ class OpenWebUIStats: "total_upvotes": stats["total_upvotes"], "followers": stats.get("user", {}).get("followers", 0), "points": stats.get("user", {}).get("total_points", 0), + "posts": {p["slug"]: p["downloads"] for p in stats.get("posts", [])}, } # 更新或追加数据点