mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
more robust half time detection
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user