mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
ensure we are pulling game Id's for odds
This commit is contained in:
@@ -349,6 +349,7 @@ class BaseMLBManager:
|
|||||||
self.logger.info("Using test mode data for MLB")
|
self.logger.info("Using test mode data for MLB")
|
||||||
return {
|
return {
|
||||||
'test_game_1': {
|
'test_game_1': {
|
||||||
|
'id': 'test_game_1',
|
||||||
'away_team': 'TB',
|
'away_team': 'TB',
|
||||||
'home_team': 'TEX',
|
'home_team': 'TEX',
|
||||||
'away_score': 3,
|
'away_score': 3,
|
||||||
@@ -519,6 +520,7 @@ class BaseMLBManager:
|
|||||||
bases_occupied = [False, False, False]
|
bases_occupied = [False, False, False]
|
||||||
|
|
||||||
all_games[game_id] = {
|
all_games[game_id] = {
|
||||||
|
'id': game_id,
|
||||||
'away_team': away_abbr,
|
'away_team': away_abbr,
|
||||||
'home_team': home_abbr,
|
'home_team': home_abbr,
|
||||||
'away_score': away_team['score'],
|
'away_score': away_team['score'],
|
||||||
@@ -975,7 +977,9 @@ class MLBRecentManager(BaseMLBManager):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Update recent games data."""
|
"""Update recent games data."""
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
self.logger.info("Checking for recent MLB games...")
|
||||||
if current_time - self.last_update < self.update_interval:
|
if current_time - self.last_update < self.update_interval:
|
||||||
|
self.logger.info("Skipping recent games update, interval not reached.")
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -1086,7 +1090,9 @@ class MLBUpcomingManager(BaseMLBManager):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Update upcoming games data."""
|
"""Update upcoming games data."""
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
self.logger.info("Checking for upcoming MLB games...")
|
||||||
if current_time - self.last_update < self.update_interval:
|
if current_time - self.last_update < self.update_interval:
|
||||||
|
self.logger.info("Skipping upcoming games update, interval not reached.")
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user