MLB-LED-Scoreboard / mlb-led-scoreboard

An LED scoreboard for Major League Baseball :baseball:
GNU General Public License v3.0
582 stars 105 forks source link

Clean up schedule advancement logic #467

Closed WardBrian closed 1 year ago

WardBrian commented 1 year ago

I think this might fix #466, but I have yet to witness the issue on my own hardware so I can't fully recreate it.

A few tweaks:

  1. Completed games are no longer considered "live" (we have a separate "fresh" status for them, anyway)
  2. The current_idx is now updated if the list of games got shorter in a refresh
  3. _game_index_for_preferred_team no longer returns current_idx if it fails to find a preferred game - it returns -1
  4. Removed a flag which was set when the 'preferred game' ended (which almost certainly didn't do the right thing during double headers, anyway)

Number 3 above is the cause of the issue @ty-porter noted on discord with a game being labelled as 'preferred' when it never should have been. Any of them could cause #466, IMO.