more robust half time detection

This commit is contained in:
Chuck
2025-08-09 20:06:25 -05:00
parent 938c31c815
commit 6a2e5edf2e
3 changed files with 5 additions and 5 deletions

View File

@@ -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,