From 6403d2f511abcc648fb42aeed020ff40cc682ac9 Mon Sep 17 00:00:00 2001 From: yunyaozhou Date: Sat, 8 Aug 2026 07:54:09 +0800 Subject: [PATCH] fix: preserve source failures in last fetch --- sub2api_quota_tui.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sub2api_quota_tui.py b/sub2api_quota_tui.py index 9b89591..505dbbd 100644 --- a/sub2api_quota_tui.py +++ b/sub2api_quota_tui.py @@ -1997,7 +1997,13 @@ def account_pricing_fetch_label( fetched = short_time(account.get("pricing_last_fetch_at")) status = str(account.get("pricing_fetch_status") or "").strip() if fetched == "-": - return str(pricing_source.get("updated") or "-") if pricing_source else (status or "-") + if not pricing_source: + return status or "-" + updated = str(pricing_source.get("updated") or "-") + source_status = str(pricing_source.get("status") or "").strip() + if source_status not in {"", "healthy"}: + return f"{updated} {source_status}" if updated != "-" else source_status + return updated if status in {"", "matched", "ok"}: return fetched return f"{fetched} {status}"