File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -555,6 +555,16 @@ def fetch_bracket_progress(url: str) -> dict:
555555 m ["resolved_round" ] = m .get ("round" ) or m .get ("roundNum" ) or 1
556556 real_matches .append (m )
557557
558+ # Normalize round numbers so the first real round is always Round 1.
559+ # When participant count is <= half the bracket size, Matcherino gives every
560+ # team a first-round BYE. After filtering those out, resolved_round starts
561+ # at 2+, shifting every displayed round label up by one.
562+ if real_matches :
563+ min_round = min (m ["resolved_round" ] for m in real_matches )
564+ if min_round > 1 :
565+ for m in real_matches :
566+ m ["resolved_round" ] -= min_round - 1
567+
558568 # Build visual numbering map (the numbers staff see on the bracket UI).
559569 # We keep this consistent with fetch_ticket_context: sort visible matches by API matchNum
560570 # and assign sequential visual numbers.
You can’t perform that action at this time.
0 commit comments