Fix overlay timer API: use web_dashboard.current_timer_state instead of games_thread

parent 95fd0fb3
...@@ -10856,11 +10856,12 @@ def get_overlay_timer(): ...@@ -10856,11 +10856,12 @@ def get_overlay_timer():
timer_state = {"running": False, "remaining_seconds": 0} timer_state = {"running": False, "remaining_seconds": 0}
# Try to get timer state from games thread # Try to get timer state from web_dashboard (where it's actually stored)
if main_app: if main_app:
games_thread = getattr(main_app, 'games_thread', None) web_dashboard = getattr(main_app, 'web_dashboard', None)
if games_thread and hasattr(games_thread, 'timer_state'): if web_dashboard and hasattr(web_dashboard, 'current_timer_state'):
timer_state = games_thread.timer_state.copy() timer_state = web_dashboard.current_timer_state.copy()
logger.debug(f"[OVERLAY TIMER] Returning timer state: {timer_state}")
return jsonify(timer_state) return jsonify(timer_state)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment