mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-15 14:52:59 +00:00
fix NCAA FB cache error
This commit is contained in:
@@ -883,12 +883,6 @@ class NCAAFBRecentManager(BaseNCAAFBManager): # Renamed class
|
|||||||
|
|
||||||
self.last_update = current_time # Update time even if fetch fails
|
self.last_update = current_time # Update time even if fetch fails
|
||||||
|
|
||||||
# Check for cached processed games first
|
|
||||||
cached_games = self._get_cached_processed_games('recent')
|
|
||||||
if cached_games:
|
|
||||||
self.logger.debug("[NCAAFB Recent] Using cached processed games")
|
|
||||||
team_games = cached_games
|
|
||||||
else:
|
|
||||||
try:
|
try:
|
||||||
data = self._fetch_data() # Uses shared cache
|
data = self._fetch_data() # Uses shared cache
|
||||||
if not data or 'events' not in data:
|
if not data or 'events' not in data:
|
||||||
@@ -928,9 +922,6 @@ class NCAAFBRecentManager(BaseNCAAFBManager): # Renamed class
|
|||||||
# Limit to the specified number of recent games
|
# Limit to the specified number of recent games
|
||||||
team_games = team_games[:self.recent_games_to_show]
|
team_games = team_games[:self.recent_games_to_show]
|
||||||
|
|
||||||
# Cache the processed games
|
|
||||||
self._cache_processed_games('recent', team_games)
|
|
||||||
|
|
||||||
# Check if the list of games to display has changed
|
# Check if the list of games to display has changed
|
||||||
new_game_ids = {g['id'] for g in team_games}
|
new_game_ids = {g['id'] for g in team_games}
|
||||||
current_game_ids = {g['id'] for g in self.games_list}
|
current_game_ids = {g['id'] for g in self.games_list}
|
||||||
@@ -1103,12 +1094,6 @@ class NCAAFBUpcomingManager(BaseNCAAFBManager): # Renamed class
|
|||||||
|
|
||||||
self.last_update = current_time
|
self.last_update = current_time
|
||||||
|
|
||||||
# Check for cached processed games first
|
|
||||||
cached_games = self._get_cached_processed_games('upcoming')
|
|
||||||
if cached_games:
|
|
||||||
self.logger.debug("[NCAAFB Upcoming] Using cached processed games")
|
|
||||||
team_games = cached_games
|
|
||||||
else:
|
|
||||||
try:
|
try:
|
||||||
data = self._fetch_data() # Uses shared cache
|
data = self._fetch_data() # Uses shared cache
|
||||||
if not data or 'events' not in data:
|
if not data or 'events' not in data:
|
||||||
@@ -1156,9 +1141,6 @@ class NCAAFBUpcomingManager(BaseNCAAFBManager): # Renamed class
|
|||||||
# Limit to the specified number of upcoming games
|
# Limit to the specified number of upcoming games
|
||||||
team_games = team_games[:self.upcoming_games_to_show]
|
team_games = team_games[:self.upcoming_games_to_show]
|
||||||
|
|
||||||
# Cache the processed games
|
|
||||||
self._cache_processed_games('upcoming', team_games)
|
|
||||||
|
|
||||||
# Log changes or periodically
|
# Log changes or periodically
|
||||||
should_log = (
|
should_log = (
|
||||||
current_time - self.last_log_time >= self.log_interval or
|
current_time - self.last_log_time >= self.log_interval or
|
||||||
|
|||||||
Reference in New Issue
Block a user