From 2c2d24c0a8c1dbf6fbe6ba875d8311e8e5705196 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Mon, 18 Aug 2025 21:01:39 -0500 Subject: [PATCH] Fix missing datetime variables for baseball live games MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added back day_text, date_text, and time_text variables for baseball live games - These variables are needed for the datetime display section - Shows inning (▲5), count (2-1), and outs (2 outs) in the datetime column - Fixes the 'cannot access local variable' error that was occurring --- src/odds_ticker_manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/odds_ticker_manager.py b/src/odds_ticker_manager.py index 9d5a77cf..59a0039f 100644 --- a/src/odds_ticker_manager.py +++ b/src/odds_ticker_manager.py @@ -888,6 +888,17 @@ class OddsTickerManager: # Store bases data for later drawing self._bases_data = live_info.get('bases_occupied', [False, False, False]) + + # Set datetime text for baseball live games + inning_half_indicator = "▲" if live_info.get('inning_half') == 'top' else "▼" + inning_text = f"{inning_half_indicator}{live_info.get('inning', 1)}" + count_text = f"{live_info.get('balls', 0)}-{live_info.get('strikes', 0)}" + outs_count = live_info.get('outs', 0) + outs_text = f"{outs_count} out" if outs_count == 1 else f"{outs_count} outs" + + day_text = inning_text + date_text = count_text + time_text = outs_text elif sport == 'football': # Football: Show quarter and down/distance quarter_text = f"Q{live_info.get('quarter', 1)}"