fix: show correct "Game X of 7" for future playoff dates
Enrich raw score-endpoint games with gameNumber from the series cache before parsing. The score API omits gameNumber and its seriesStatus reflects current wins, so all future games in a series computed the same number. Now we cross-reference by game id against the cached series-detail endpoint which includes the correct gameNumber per game. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ from app.playoff import today_meta
|
||||
from app.bracket_view import build_bracket_view
|
||||
from app.playoff_cache import (
|
||||
day_n_for_round,
|
||||
enrich_game_numbers,
|
||||
fetch_series,
|
||||
get_bracket,
|
||||
parse_series_id,
|
||||
@@ -118,6 +119,7 @@ def get_scoreboard():
|
||||
|
||||
if scoreboard_data:
|
||||
raw_games = scoreboard_data.get("games", [])
|
||||
enrich_game_numbers(raw_games)
|
||||
games = parse_games(scoreboard_data)
|
||||
max_round = _max_playoff_round(raw_games)
|
||||
n = day_n_for_round(max_round) if max_round else None
|
||||
|
||||
Reference in New Issue
Block a user