mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
Improve odds ticker live game display formatting
- Removed parentheses around scores for live games (e.g., 'Team 5' instead of 'Team (5)') - Improved bases section for baseball games: - Changed from '1', '2', '3' to '1B', '2B', '3B' for clarity - Changed from '---' to 'Empty' when no bases are occupied - This makes it much clearer what the information represents - Live games now show cleaner, more readable score format
This commit is contained in:
@@ -930,8 +930,8 @@ class OddsTickerManager:
|
|||||||
if is_live and live_info:
|
if is_live and live_info:
|
||||||
away_score = live_info.get('away_score', 0)
|
away_score = live_info.get('away_score', 0)
|
||||||
home_score = live_info.get('home_score', 0)
|
home_score = live_info.get('home_score', 0)
|
||||||
away_team_text = f"{game.get('away_team_name', game.get('away_team', 'N/A'))} ({away_score})"
|
away_team_text = f"{game.get('away_team_name', game.get('away_team', 'N/A'))} {away_score}"
|
||||||
home_team_text = f"{game.get('home_team_name', game.get('home_team', 'N/A'))} ({home_score})"
|
home_team_text = f"{game.get('home_team_name', game.get('home_team', 'N/A'))} {home_score}"
|
||||||
|
|
||||||
away_team_width = int(temp_draw.textlength(away_team_text, font=team_font))
|
away_team_width = int(temp_draw.textlength(away_team_text, font=team_font))
|
||||||
home_team_width = int(temp_draw.textlength(home_team_text, font=team_font))
|
home_team_width = int(temp_draw.textlength(home_team_text, font=team_font))
|
||||||
@@ -975,10 +975,10 @@ class OddsTickerManager:
|
|||||||
# Show bases occupied for baseball
|
# Show bases occupied for baseball
|
||||||
bases = live_info.get('bases_occupied', [False, False, False])
|
bases = live_info.get('bases_occupied', [False, False, False])
|
||||||
bases_text = ""
|
bases_text = ""
|
||||||
if bases[0]: bases_text += "1"
|
if bases[0]: bases_text += "1B"
|
||||||
if bases[1]: bases_text += "2"
|
if bases[1]: bases_text += "2B"
|
||||||
if bases[2]: bases_text += "3"
|
if bases[2]: bases_text += "3B"
|
||||||
if not bases_text: bases_text = "---"
|
if not bases_text: bases_text = "Empty"
|
||||||
|
|
||||||
away_odds_text = f"Bases: {bases_text}"
|
away_odds_text = f"Bases: {bases_text}"
|
||||||
home_odds_text = f"Count: {live_info.get('balls', 0)}-{live_info.get('strikes', 0)}"
|
home_odds_text = f"Count: {live_info.get('balls', 0)}-{live_info.get('strikes', 0)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user