mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
Fix missing datetime variables for baseball live games
- 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
This commit is contained in:
@@ -888,6 +888,17 @@ class OddsTickerManager:
|
|||||||
|
|
||||||
# Store bases data for later drawing
|
# Store bases data for later drawing
|
||||||
self._bases_data = live_info.get('bases_occupied', [False, False, False])
|
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':
|
elif sport == 'football':
|
||||||
# Football: Show quarter and down/distance
|
# Football: Show quarter and down/distance
|
||||||
quarter_text = f"Q{live_info.get('quarter', 1)}"
|
quarter_text = f"Q{live_info.get('quarter', 1)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user