Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple runs for the same category in SRC response causing incorrect info to be displayed #91

Open
RequiemOfSpirit opened this issue Nov 23, 2023 · 8 comments

Comments

@RequiemOfSpirit
Copy link

RequiemOfSpirit commented Nov 23, 2023

I'm not sure why, but for some reason, the response for the SRC GET personal-bests requests seems to contain multiple runs for some categories (the response contains both my current and previous submissions for some categories).
It seems like these are being deduped by this extension, but the slower (and older) of the duplicates is what ends up showing up. Would it be possible to modify the extension to always display the fastest run in case multiple runs are seen for the same category in the SRC response?


In the image below, both the All Towers run and the Dark World NMG run have more recent times that are present in the SRC response along with my previous submission, but only the slower previous submission shows up on the extension:

image

Here's a file containing the full SRC json response that i pulled from the network tab. The 1st two entries in the data array contain the newer and faster All Towers and Dark World runs that don't show up on the extension. The runs that actually do show up are found further along in the array:
src-personal-best-response.json

@RequiemOfSpirit RequiemOfSpirit changed the title Duplicates in SRC response causing incorrect info to be displayed Multiple runs for the same category in SRC response causing incorrect info to be displayed Nov 23, 2023
@xTVaser
Copy link
Owner

xTVaser commented Nov 23, 2023

Is this potentially related to this issue speedruncomorg/api#160 where allegedly the problem goes away in a few days?

If it never goes away, and the runs are indeed obsolete then yeah they can definitely be filtered out by the extension.

@RequiemOfSpirit
Copy link
Author

Aah, wasn't aware of that. I'll check back here in a week or so then and close this if the issue is resolved

@xTVaser
Copy link
Owner

xTVaser commented Nov 23, 2023

👍 No worries. It seems that the speedrun.com API doesn't get much love in terms of bug-fixes and what-not so if these problems continue to be annoying it might make sense to deal with them downstream (it wouldn't be the first thing that is being worked around lol).

But if it does go away and it's related to that issue it'll be good to know.

@RequiemOfSpirit
Copy link
Author

Makes sense.

Unrelated to this issue (and i didn't want to create a new one for this) but i remember V1 of this extension allowing for a bit more customization, like being able to choose what specific order to display games in or being able to add and change a title on top of the extension (might be misremembering with this one). Are similar features planned for V2?

@xTVaser
Copy link
Owner

xTVaser commented Nov 23, 2023

Those features (and more) were planned and actually done but then i ran into the one downside of using Twitch to store the extension configuration which is the amount of configuration you can store per user is pretty small (like 5kb iirc).

It would be possible to add them back, but you'd only be able to take advantage of the features if you have a small amount of games, I might do that eventually.

@RequiemOfSpirit
Copy link
Author

Checking again after about 2 weeks or so, and it's still displaying the older runs :(
I guess it would be nice if the extension filtered out these runs, so you don't have to wait multiple weeks to see the updates

@shiken-yme
Copy link

Just want to mention I'm having the same issue. I had my doubts that it was a cache issue since I reloaded games and changed attributed SRC accounts like a billion times, and this thread seems to confirm my doubts - it's probably just new SRC jank. Multiple of the categories I've ran since around... I think maybe late October or early November or somewhere in that range... haven't updated leaderboard position or time at all. It's picking up new runs in new categories but the times I've improved since then in previously ran categories don't update at all.

Example of a new run in a previously ran category that's yet to update in the extension

issue1
image

Example of a new run in a category I hadn't done before that has been picked up by the extension

image
image

Pranav-FP pushed a commit to Pranav-FP/src-twitch-ext that referenced this issue Nov 11, 2024
@GMPranav
Copy link

I noticed that the good thing about the API is that it at-least sends the runs sorted by latest first and therefore we can solve the issue by using only the first entry for a given category instead of overriding it in the map.

markisha64 added a commit to markisha64/src-twitch-ext that referenced this issue Nov 21, 2024
Add only the first PB entry for a given category (Resolves xTVaser#91)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants