diff --git a/.gitignore b/.gitignore index 918223a..7cf2e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] *$py.class +.cache.sqlite # C extensions *.so diff --git a/modules/commands/sports_command.py b/modules/commands/sports_command.py index a362daa..3bc04d9 100644 --- a/modules/commands/sports_command.py +++ b/modules/commands/sports_command.py @@ -903,7 +903,12 @@ class SportsCommand(BaseCommand): period_str = f"{period}H" # Fallback to half formatted = f"@{home_name} {home_score}-{away_score} {away_name} ({clock} {period_str})" elif sport == 'baseball': - period_str = f"{period}I" # Innings - no clock needed + # Use shortDetail for ongoing baseball games to show top/bottom of inning + short_detail = status.get('type', {}).get('shortDetail', '') + if short_detail and ('Top' in short_detail or 'Bottom' in short_detail): + period_str = short_detail # e.g., "Top 14th", "Bottom 9th" + else: + period_str = f"{period}I" # Fallback to inning number only formatted = f"{away_name} {away_score}-{home_score} @{home_name} ({period_str})" elif sport == 'football': period_str = f"Q{period}" # Quarters @@ -1142,7 +1147,12 @@ class SportsCommand(BaseCommand): period_str = f"{period}H" # Fallback to half formatted = f"@{home_name} {home_score}-{away_score} {away_name} ({clock} {period_str})" elif sport == 'baseball': - period_str = f"{period}I" # Innings - no clock needed + # Use shortDetail for ongoing baseball games to show top/bottom of inning + short_detail = status.get('type', {}).get('shortDetail', '') + if short_detail and ('Top' in short_detail or 'Bottom' in short_detail): + period_str = short_detail # e.g., "Top 14th", "Bottom 9th" + else: + period_str = f"{period}I" # Fallback to inning number only formatted = f"{away_name} {away_score}-{home_score} @{home_name} ({period_str})" elif sport == 'football': period_str = f"Q{period}" # Quarters