gafirst / match-uploader

Upload FRC match videos to YouTube in a fast, consistent manner
GNU General Public License v3.0
1 stars 2 forks source link

feat: Implement full Next Match button functionality #99

Closed evan10s closed 6 months ago

evan10s commented 6 months ago

Adds full functionality for the Next Match button. Since the match list changes during the event and there's no clear "correct" ordering, we instead rely on parsing match keys to guess the next match and accept the guess if it's in the match list, refreshing the match list once if necessary.

The full algorithm is:

  1. Client sends a request to the server to return possible next matches (this is because the server has better abstractions around parsing match keys that aren't worth replicating to the frontend)
  2. Server responds with up to 2 matches:
    1. The next match in the same tournament phase (ex: qual 1 -> qual 2)
    2. The first match in the next tournament phase (ex: qual 34 -> playoff 1)
  3. Client checks its current match list to see if option 1 is in the match list, or if not, if option 2 is in the match list
  4. If neither match suggestion exists, refresh the match list and try again
  5. If neither match suggestion exists still, show an error

Due to low usage of best of 3 playoffs nowadays, this feature only supports double eliminations. A warning appears if the Next Match button can't be used because of the current playoffs type.

Closes #62

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 3.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: