ensure game rotation count respects user defined variable

This commit is contained in:
ChuckBuilds
2025-08-14 13:01:23 -05:00
parent 6152969340
commit 54635fee3c
8 changed files with 158 additions and 23 deletions

View File

@@ -1255,7 +1255,7 @@ class MLBRecentManager(BaseMLBManager):
current_time = time.time()
# Check if it's time to switch games
if current_time - self.last_game_switch >= self.game_display_duration:
if len(self.recent_games) > 1 and current_time - self.last_game_switch >= self.game_display_duration:
# Move to next game
self.current_game_index = (self.current_game_index + 1) % len(self.recent_games)
self.current_game = self.recent_games[self.current_game_index]
@@ -1377,7 +1377,7 @@ class MLBUpcomingManager(BaseMLBManager):
current_time = time.time()
# Check if it's time to switch games
if current_time - self.last_game_switch >= self.game_display_duration:
if len(self.upcoming_games) > 1 and current_time - self.last_game_switch >= self.game_display_duration:
# Move to next game
self.current_game_index = (self.current_game_index + 1) % len(self.upcoming_games)
self.current_game = self.upcoming_games[self.current_game_index]