From 297a950385e2ab4f533a310ffbd04ee30a9ec703 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:58:41 -0500 Subject: [PATCH] adjustments made to MLB inning logic, pulling short detail --- src/mlb_manager.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mlb_manager.py b/src/mlb_manager.py index 1464c364..48495ded 100644 --- a/src/mlb_manager.py +++ b/src/mlb_manager.py @@ -336,8 +336,8 @@ class BaseMLBManager: self.logger.info(f"Found favorite team game: {away_abbr} @ {home_abbr} (Status: {status}, State: {status_state})") self.logger.debug(f"[MLB] Full status data: {event['status']}") self.logger.debug(f"[MLB] Status type: {status}, State: {status_state}") - self.logger.debug(f"[MLB] Status detail: {event['status'].get('detail', '')}") - self.logger.debug(f"[MLB] Status shortDetail: {event['status'].get('shortDetail', '')}") + self.logger.debug(f"[MLB] Status detail: {event['status']['type'].get('detail', '')}") + self.logger.debug(f"[MLB] Status shortDetail: {event['status']['type'].get('shortDetail', '')}") # Get game state information if status_state == 'in': @@ -345,12 +345,12 @@ class BaseMLBManager: inning = event['status'].get('period', 1) # Get inning from status period # Get inning information from status - status_detail = event['status'].get('detail', '').lower() - status_short = event['status'].get('shortDetail', '').lower() + status_detail = event['status']['type'].get('detail', '').lower() + status_short = event['status']['type'].get('shortDetail', '').lower() if is_favorite_game: - self.logger.debug(f"[MLB] Raw status detail: {event['status'].get('detail')}") - self.logger.debug(f"[MLB] Raw status short: {event['status'].get('shortDetail')}") + self.logger.debug(f"[MLB] Raw status detail: {event['status']['type'].get('detail')}") + self.logger.debug(f"[MLB] Raw status short: {event['status']['type'].get('shortDetail')}") # Determine inning half from status information inning_half = 'top' # Default