diff --git a/src/ncaa_fb_managers.py b/src/ncaa_fb_managers.py index 013bedb8..4b6dfa9c 100644 --- a/src/ncaa_fb_managers.py +++ b/src/ncaa_fb_managers.py @@ -438,7 +438,7 @@ class BaseNCAAFBManager: # Renamed class elif period == 4: period_text = "Q3" elif period == 5: period_text = "Q4" elif period > 5: period_text = "OT" # Assuming OT starts at period 6+ - elif status["type"]["state"] == "halftime": # Check explicit halftime state + elif status["type"]["state"] == "halftime" or status["type"]["name"] == "STATUS_HALFTIME": # Check explicit halftime state period_text = "HALF" elif status["type"]["state"] == "post": if period > 5 : period_text = "Final/OT" @@ -466,7 +466,7 @@ class BaseNCAAFBManager: # Renamed class "is_live": status["type"]["state"] == "in", "is_final": status["type"]["state"] == "post", "is_upcoming": status["type"]["state"] == "pre", - "is_halftime": status["type"]["state"] == "halftime", # Added halftime check + "is_halftime": status["type"]["state"] == "halftime" or status["type"]["name"] == "STATUS_HALFTIME", # Added halftime check "home_abbr": home_abbr, "home_score": home_team.get("score", "0"), "home_record": home_record, diff --git a/src/ncaam_basketball_managers.py b/src/ncaam_basketball_managers.py index 8c957e36..3983a0f4 100644 --- a/src/ncaam_basketball_managers.py +++ b/src/ncaam_basketball_managers.py @@ -396,7 +396,7 @@ class BaseNCAAMBasketballManager: "period": status.get("period", 0), "clock": status.get("displayClock", "0:00"), "is_live": status["type"]["state"] in ("in", "halftime"), # Include halftime as live - "is_halftime": status["type"]["state"] == "halftime", + "is_halftime": status["type"]["state"] == "halftime" or status["type"]["name"] == "STATUS_HALFTIME", "is_final": status["type"]["state"] == "post", "is_upcoming": status["type"]["state"] == "pre", "home_abbr": home_team["team"]["abbreviation"], diff --git a/src/nfl_managers.py b/src/nfl_managers.py index a803debf..11e96146 100644 --- a/src/nfl_managers.py +++ b/src/nfl_managers.py @@ -382,7 +382,7 @@ class BaseNFLManager: # Renamed class elif period == 3: period_text = "Q3" # Fixed: period 3 is 3rd quarter, not halftime elif period == 4: period_text = "Q4" elif period > 4: period_text = "OT" # OT starts after Q4 - elif status["type"]["state"] == "halftime": # Check explicit halftime state + elif status["type"]["state"] == "halftime" or status["type"]["name"] == "STATUS_HALFTIME": # Check explicit halftime state period_text = "HALF" elif status["type"]["state"] == "post": if period > 4 : period_text = "Final/OT" @@ -407,7 +407,7 @@ class BaseNFLManager: # Renamed class "is_live": status["type"]["state"] == "in", "is_final": status["type"]["state"] == "post", "is_upcoming": status["type"]["state"] == "pre", - "is_halftime": status["type"]["state"] == "halftime", # Added halftime check + "is_halftime": status["type"]["state"] == "halftime" or status["type"]["name"] == "STATUS_HALFTIME", # Added halftime check "home_abbr": home_abbr, "home_score": home_team.get("score", "0"), "home_record": home_record,