From 2e0672c7d90b878606186107faaf23dd1db25741 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:53:31 -0500 Subject: [PATCH] Fix MLB upcoming games status check to match API response --- src/mlb_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mlb_manager.py b/src/mlb_manager.py index c5f1b9ee..fccb8c02 100644 --- a/src/mlb_manager.py +++ b/src/mlb_manager.py @@ -562,14 +562,14 @@ class MLBUpcomingManager(BaseMLBManager): logger.info(f"Checking game: {game['away_team']} @ {game['home_team']} at {game_time}") logger.info(f"Game status: {game['status']}") - # Check if game is within our time window and has preview status + # Check if game is within our time window and has scheduled status is_within_time = game_time <= upcoming_cutoff - is_preview = game['status'] == 'preview' + is_scheduled = game['status'] == 'status_scheduled' logger.info(f"Within time window: {is_within_time}") - logger.info(f"Is preview status: {is_preview}") + logger.info(f"Is scheduled status: {is_scheduled}") - if is_preview and is_within_time: + if is_scheduled and is_within_time: new_upcoming_games.append(game) logger.info(f"Added game to upcoming list: {game['away_team']} @ {game['home_team']}")