fix(douyu): 按到期时间修正精英宝典状态

This commit is contained in:
yml
2026-11-19 18:01:41 +08:00
parent ea79339c30
commit 66a310ec98
13 changed files with 283 additions and 36 deletions
+6 -2
View File
@@ -57,6 +57,10 @@ from .douyu_activity_query import (
query_exchange_records,
query_gold_account,
)
from .douyu_elite_status import (
elite_is_currently_open,
normalize_elite_expire_time,
)
from .douyu_goods_service import (
serialize_live_goods as _serialize_live_goods,
)
@@ -346,7 +350,7 @@ def _probe_with_client(
manual_type = _to_int(elite.get("manual_type"))
manual_score = _to_int(elite.get("manual_score"))
expire_time = _to_int(elite.get("expire_time"))
expire_time = normalize_elite_expire_time(elite.get("expire_time"))
user_info = elite.get("user_info") or {}
profile = DouyuActivityClient.profile_from_cookie(str(account.cookie or ""))
bind_role = _text(bind_snapshot["role_name"], max_length=128)
@@ -373,7 +377,7 @@ def _probe_with_client(
"manual_type": manual_type,
"manual_score": manual_score,
"expire_time": expire_time,
"manual_opened": bool(manual_type is not None and manual_type >= 1),
"manual_opened": elite_is_currently_open(manual_type, expire_time),
"bind_status": bind_snapshot["bind_status"],
"bind_phase": bind_snapshot["bind_phase"],
"bind_game_account": bind_account,