From daabae1e493464c2ec0bf8baeb2157e97e743f76 Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Sun, 25 Feb 2024 01:17:04 -0500 Subject: [PATCH 1/2] fix: add shootout indicator --- app/static/script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/static/script.js b/app/static/script.js index d683d3d..dcf9ab3 100644 --- a/app/static/script.js +++ b/app/static/script.js @@ -166,9 +166,12 @@ function generateGameBoxes(games, state) { else if (game['Period'] == 3 ) { html += '3rd'; } - else { + else if (game['Period'] == 4 ) { html += 'OT'; } + else { + html += 'SO'; + } html += ''; html += '
' + game['Time Remaining'] + '
'; } From 8913b40a8c2fa498d7a108d1f4b805ab94f2d1d3 Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Mon, 11 Mar 2024 12:37:19 -0400 Subject: [PATCH 2/2] hotfix: correct for dst --- app/scoreboard/process_data.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/scoreboard/process_data.py b/app/scoreboard/process_data.py index 62e7702..06e20a7 100644 --- a/app/scoreboard/process_data.py +++ b/app/scoreboard/process_data.py @@ -148,6 +148,11 @@ def calculate_game_priority(game): time_priority = ((1200 - time_remaining) / 20) * time_multiplier + print(base_priority) + print(time_priority) + print(matchup_adjustment) + print(score_total) + # Calculate the final priority final_priority = int(base_priority + time_priority - matchup_adjustment + score_total) @@ -171,6 +176,6 @@ def get_team_standings(team_name): def utc_to_est_time(utc_time): utc_datetime = datetime.strptime(utc_time, "%Y-%m-%dT%H:%M:%SZ") - est_offset = timedelta(hours=-5) + est_offset = timedelta(hours=-4) est_datetime = utc_datetime + est_offset return est_datetime.strftime("%#I:%M %p")