display improvements for the scrolling

This commit is contained in:
Chuck
2025-07-20 20:14:24 -05:00
parent 1630e2d2ba
commit 25a6bf9dc8
2 changed files with 146 additions and 136 deletions

View File

@@ -427,14 +427,9 @@ class BaseMLBManager:
home_abbr = home_team['team']['abbreviation']
away_abbr = away_team['team']['abbreviation']
# Get team records
home_record = "0-0"
if 'record' in home_team and len(home_team['record']) > 0:
home_record = home_team['record'][0].get('summary', '0-0')
away_record = "0-0"
if 'record' in away_team and len(away_team['record']) > 0:
away_record = away_team['record'][0].get('summary', '0-0')
# Get team records - Corrected path
home_record = home_team.get('records', [{}])[0].get('summary', '') if home_team.get('records') else ''
away_record = away_team.get('records', [{}])[0].get('summary', '') if away_team.get('records') else ''
# Check if this is a favorite team game
is_favorite_game = (home_abbr in self.favorite_teams or away_abbr in self.favorite_teams)