speedcontrol / nodecg-speedcontrol

NodeCG bundle to help facilitate the running of speedrunning marathons, including overlays.
MIT License
45 stars 34 forks source link

Attempt to make speedrun.com user lookup more accurate #97

Closed zoton2 closed 3 years ago

zoton2 commented 3 years ago

Recently I noticed the lookup parameter on the speedrun.com API wasn't working anymore (since reported) so in the dev branch I changed it to using the twitch or name parameters where applicable. In a production though it found found an incorrect user because of how their backend searching works. This should be improved in a similar way to how I improved the Twitch API directory search, where it gets the first X results instead of just the first, and checks for an exact match and uses that if available.

zoton2 commented 3 years ago

There is also an issue where people's speedrun.com name differs from their Twitch name, and if you export the Oengus schedule to Horaro and then try to import it, the search fails because the name is a Twitch username but there is no link, so it only attempts to check the name paramter, and finds nothing.

zoton2 commented 3 years ago

Have attempted to improve this, just as an extra measure we even attempt to check the Twitter username. We also now check the first 10 results for an exact match if possible.