diff --git a/app/scoreboard/process_data.py b/app/scoreboard/process_data.py index aab6253..dc35993 100644 --- a/app/scoreboard/process_data.py +++ b/app/scoreboard/process_data.py @@ -76,7 +76,7 @@ def get_game_outcome(game, game_state): def calculate_game_priority(game): # Return 0 if game is in certain states - if game["gameState"] in ["FINAL", "OFF", "PRE", "FUT"] or game["clock"]["inIntermission"]: + if game["gameState"] in ["FINAL", "OFF", "PRE", "FUT"]: return 0 # Get standings for home and away teams @@ -121,6 +121,10 @@ def calculate_game_priority(game): # Calculate the final priority final_priority = int(base_priority + time_priority - matchup_adjustment + score_total) + # Pushes the games that are in intermission to the bottom, but retains their sort + if game["clock"]["inIntermission"]: + return (final_priority - 2000) + return final_priority def get_team_standings(team_name):