Fix sports managers background updates and update intervals (#51)

- Add all sports managers to background updates in display_controller.py
- Add all sports managers to deferred updates when scrolling
- Fix hardcoded update intervals in NHL, NBA, NCAA Basketball, and NCAA Hockey managers
- Use config values for recent_update_interval and upcoming_update_interval
- Ensure all sports managers update continuously in background
- Only NFL managers had the season fetching issue, others were already optimized
This commit is contained in:
Chuck
2025-09-22 10:21:37 -04:00
committed by GitHub
parent cf15409973
commit b0b5af8e21
5 changed files with 108 additions and 8 deletions

View File

@@ -748,7 +748,7 @@ class NBARecentManager(BaseNBAManager):
self.recent_games = []
self.current_game_index = 0
self.last_update = 0
self.update_interval = 3600 # 1 hour for recent games
self.update_interval = self.nba_config.get("recent_update_interval", 3600) # Use config, default 1 hour
self.recent_games_to_show = self.nba_config.get("recent_games_to_show", 5) # Number of most recent games to display
self.last_game_switch = 0
self.game_display_duration = 15 # Display each game for 15 seconds
@@ -842,7 +842,7 @@ class NBAUpcomingManager(BaseNBAManager):
self.upcoming_games = []
self.current_game_index = 0
self.last_update = 0
self.update_interval = 3600 # 1 hour for upcoming games
self.update_interval = self.nba_config.get("upcoming_update_interval", 3600) # Use config, default 1 hour
self.upcoming_games_to_show = self.nba_config.get("upcoming_games_to_show", 5) # Number of upcoming games to display
self.last_game_switch = 0
self.game_display_duration = 15 # Display each game for 15 seconds