feat: 添加持久化映射加载和状态文件序列化功能,优化 GUI 显示

This commit is contained in:
Your Name committed 2026-01-15 14:25:54 +08:00
1 parent e39a984260
commit 2358682216
9 files changed
+417 -90

No files matched your search

+1 -11
View File
@@ -455,17 +455,7 @@ def main(argv: list[str]) -> int:
seconds = int(getattr(args, "test_yanghao_flow_seconds", 10) or 10)
if seconds < 1:
seconds = 1
# 优先使用实例方法;若不存在或不可调用,则直接调用模块实现以保证向后兼容
try:
fn = getattr(analyser, "_yanghao_recommend_flow", None)
if callable(fn):
fn(seconds) # type: ignore[arg-type]
else:
from douyin.other import douyin_yanghao
douyin_yanghao.yanghao_recommend_flow(analyser, seconds)
except Exception as e:
print(f"[YANGHAO-ONLY] 调用养号流程失败: {e}")
getattr(analyser, "_yanghao_recommend_flow", lambda _: None)(seconds) # type: ignore[attr-defined]
print("[TEST] done")
return 0