osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
202 stars 126 forks source link

fix: Wrong index for fetching global & country rank from redis on API `/get_player_info` #574

Closed minisbett closed 4 months ago

minisbett commented 4 months ago

Describe your changes

The code enumerated through the stats dictionary of the user, but used the index in that enumeration for the mode key instead of the actual mode value, which works fine... Up until autopilot, since the 7 (rx!mania) is skipped and 8 is the proper number to use. This caused the API to give 0 rank for autopilot for any user.

Checklist