mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
NCAA FB odds fix
This commit is contained in:
@@ -1078,6 +1078,10 @@ class NCAAFBRecentManager(BaseNCAAFBManager): # Renamed class
|
||||
if game['home_abbr'] in self.favorite_teams or
|
||||
game['away_abbr'] in self.favorite_teams]
|
||||
self.logger.info(f"[NCAAFB Recent] Found {favorite_games_found} favorite team games out of {len(processed_games)} total final games within last 21 days")
|
||||
|
||||
# Debug: Show which games are selected for display
|
||||
for i, game in enumerate(team_games):
|
||||
self.logger.info(f"[NCAAFB Recent DEBUG] Game {i+1} for display: {game['away_abbr']} @ {game['home_abbr']} - {game.get('start_time_utc')} - Score: {game['away_score']}-{game['home_score']}")
|
||||
else:
|
||||
team_games = processed_games # Show all recent games if no favorites defined
|
||||
self.logger.info(f"[NCAAFB Recent] Found {len(processed_games)} total final games within last 21 days (no favorite teams configured)")
|
||||
|
||||
@@ -35,7 +35,17 @@ class OddsManager:
|
||||
self.logger.info(f"Cache miss - fetching fresh odds from ESPN for {cache_key}")
|
||||
|
||||
try:
|
||||
url = f"{self.base_url}/{sport}/leagues/{league}/events/{event_id}/competitions/{event_id}/odds"
|
||||
# Map league names to ESPN API format
|
||||
league_mapping = {
|
||||
'ncaa_fb': 'college-football',
|
||||
'nfl': 'nfl',
|
||||
'nba': 'nba',
|
||||
'mlb': 'mlb',
|
||||
'nhl': 'nhl'
|
||||
}
|
||||
|
||||
espn_league = league_mapping.get(league, league)
|
||||
url = f"{self.base_url}/{sport}/leagues/{espn_league}/events/{event_id}/competitions/{event_id}/odds"
|
||||
self.logger.info(f"Requesting odds from URL: {url}")
|
||||
response = requests.get(url, timeout=10)
|
||||
response.raise_for_status()
|
||||
|
||||
Reference in New Issue
Block a user