change weather logging, changed odds api call to only pull odds for games we will see, expanded game fetch window to see more games on odds ticker (50days from 30).

This commit is contained in:
Chuck
2025-07-22 09:31:14 -05:00
parent 5f99cdeced
commit 4da2fd32e2
9 changed files with 64 additions and 57 deletions

View File

@@ -748,14 +748,15 @@ class NBALiveManager(BaseNBAManager):
for event in data["events"]:
details = self._extract_game_details(event)
if details and details["is_live"]:
if not self.favorite_teams or (
details["home_abbr"] in self.favorite_teams or
details["away_abbr"] in self.favorite_teams
):
# Fetch odds if enabled
if self.show_odds:
self._fetch_odds(details)
new_live_games.append(details)
# Only fetch odds for games that will be displayed
if self.nba_config.get("show_favorite_teams_only", False):
if not self.favorite_teams:
continue
if details["home_abbr"] not in self.favorite_teams and details["away_abbr"] not in self.favorite_teams:
continue
if self.show_odds:
self._fetch_odds(details)
new_live_games.append(details)
# Update game list and current game
if new_live_games: