glacials / splits-io

a speedrunning data store and analysis engine
https://splits.io
GNU Affero General Public License v3.0
132 stars 26 forks source link

Profile page PBs doesn't take account of the timing method #573

Open Refragg opened 5 years ago

Refragg commented 5 years ago

For exemple, I got a IGT PB but RTA was slower, I chose IGT by default. What's happening on my profile page is that it's displaying my IGT time for my RTA PB instead of the IGT PB

moorecp commented 4 years ago

@glacials I'm not exactly sure what the solution is here. IGT vs RTA is specified on a per-run basis and not a Game + Category basis, which is what is on the profile page. We could try to use the time as specified by only the most recent run's timing type, or build something where you can specify the preferred timing method for a category rather than just a run. Or maybe there's a better solution.

glacials commented 4 years ago

I agree having a default realtime/gametime for each category would be helpful, but I'm not positive it would solve the problem 100%. Do some communities care about both realtime and gametime? Where realtime PBs and gametime PBs are both celebrated, and one doesn't necessarily imply the other?

For the profile page / logged-in frontpage, we query for all realtime PBs, then display the time based on those runs' default timings. This is definitely wrong. Maybe what we should be doing is querying for all realtime PBs and all gametime PBs, and displaying both; so for games where you record both realtime and gametime, you'll see two PBs next to each other, one for each PB.

Code where we do this query, for reference: https://github.com/glacials/splits-io/blob/master/app/models/user.rb#L82-L83