From 0c307b3f029a580e7dd1361b5cea919d6dbb503f Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:09:42 -0500 Subject: [PATCH] fix: add display method to NBAUpcomingManager to properly show upcoming games --- src/nba_managers.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/nba_managers.py b/src/nba_managers.py index f2b3d578..9fa1a03d 100644 --- a/src/nba_managers.py +++ b/src/nba_managers.py @@ -775,4 +775,25 @@ class NBAUpcomingManager(BaseNBAManager): self.logger.error(f"[NBA] Error updating upcoming games: {e}", exc_info=True) self.games_list = [] self.current_game = None - self.last_update = current_time \ No newline at end of file + self.last_update = current_time + + def display(self, force_clear=False): + """Display upcoming games.""" + if not self.games_list: + self.logger.info("[NBA] No upcoming games to display") + self.display_manager.clear() + return + + try: + # Draw the scorebug layout + self._draw_scorebug_layout(self.current_game, force_clear) + + # Update display + self.display_manager.update_display() + + # Move to next game + self.current_game_index = (self.current_game_index + 1) % len(self.games_list) + self.current_game = self.games_list[self.current_game_index] + + except Exception as e: + self.logger.error(f"[NBA] Error displaying upcoming game: {e}", exc_info=True) \ No newline at end of file