adjust NFL quarter logic

This commit is contained in:
Chuck
2025-08-09 19:57:17 -05:00
parent e0883eeae2
commit d0ead60421
2 changed files with 5 additions and 6 deletions

View File

@@ -215,7 +215,7 @@
"nfl_scoreboard": {
"enabled": true,
"live_priority": true,
"live_game_duration": 20,
"live_game_duration": 30,
"show_odds": true,
"test_mode": false,
"update_interval_seconds": 3600,

View File

@@ -379,14 +379,13 @@ class BaseNFLManager: # Renamed class
if period == 0: period_text = "Start" # Before kickoff
elif period == 1: period_text = "Q1"
elif period == 2: period_text = "Q2"
elif period == 3: period_text = "HALF" # Halftime is usually period 3 in API
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 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
period_text = "HALF"
elif status["type"]["state"] == "post":
if period > 5 : period_text = "Final/OT"
if period > 4 : period_text = "Final/OT"
else: period_text = "Final"
elif status["type"]["state"] == "pre":
period_text = game_time # Show time for upcoming