dethredic / WC3StreamerOverlay

A simple tool for wc3 streamers to display their opponent's race and stats
GNU General Public License v3.0
30 stars 7 forks source link

bnet_stats_scraper timeout #12

Closed koin612 closed 5 years ago

koin612 commented 5 years ago

Hey @dethredic :D I hope you had a nice vacation!

I've noticed on ToD's stream, that the Overlay shows nothing if classic.battle.net isn't reachable (it threw 504). Im considering two options:

easy way: try-catch the urlopen and show a 'no record found' message more work way: try-catch also, send player names + races already to the client with msg like 'getting stats' and then update the stats 'on-the-fly' or show 'no record found' if it times out

do you have a favourite or any other ideas how to handle this? I think a lot of streamer check race on the overlay because they miss loading screen, so it should show information even if it fails to scrape stats.

dethredic commented 5 years ago

I would suggest the easy way. This seems like a rare(ish) error case without huge implications, and I would prefer not to over complicate things.

Maybe the stats could be set to NULL or -1 by default, and then in the client the UI can be updated accordingly if they don't get changed (aka the stats lookup fails)