mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
diff --git a/src/milb_manager.py b/src/milb_manager.py
|
|
index 887712c..13a062a 100644
|
|
--- a/src/milb_manager.py
|
|
+++ b/src/milb_manager.py
|
|
@@ -317,7 +317,7 @@ class BaseMiLBManager:
|
|
|
|
def _fetch_milb_api_data(self, use_cache: bool = True) -> Dict[str, Any]:
|
|
"""Fetch MiLB game data from the MLB Stats API."""
|
|
- cache_key = "milb_api_data"
|
|
+ cache_key = "milb_live_api_data"
|
|
if use_cache:
|
|
cached_data = self.cache_manager.get_with_auto_strategy(cache_key)
|
|
if cached_data:
|
|
@@ -346,6 +346,16 @@ class BaseMiLBManager:
|
|
}
|
|
}
|
|
|
|
+ # Check if we're in MiLB season (April-September)
|
|
+ now = datetime.now()
|
|
+ current_month = now.month
|
|
+ in_season = 4 <= current_month <= 9
|
|
+
|
|
+ if not in_season:
|
|
+ self.logger.info("MiLB is currently in offseason (October-March). No games expected.")
|
|
+ self.logger.info("Consider enabling test_mode for offseason testing.")
|
|
+ return {}
|
|
+
|
|
# MiLB league sport IDs (configurable)
|
|
sport_ids = self.milb_config.get('sport_ids', [10, 11, 12, 13, 14, 15]) # Mexican, AAA, AA, A+, A, Rookie
|
|
|