Fix: Praying mantis leaderboard #5227
Open
+60
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Praying mantis leaderboard was using the id of "praying mantis" directly in the URL, which was erroring out because there's a space in the URL. The proper url is just
mantis.Also adds support for if I change the backend api at some point to return non-sequential upcoming players which may be necessary if SkyHanni is hammering the API too much. Kinda impossible to test right now, but it seems to work.
A non sequential response might include upcoming players at ranks like:
49998, 49997, 49996, 49995, 49994, 49500, 49000, 48500Such that there will likely be some player in the request immediately to use rather than loop with requests, we'll see if it's needed though.
Images
If the upcoming player isn't the next one a grayed out rank shows here:

Changelog Fixes
Changelog Technical Details