EsportsHelper icon indicating copy to clipboard operation
EsportsHelper copied to clipboard

Updated content-type check. This change addresses the issue where 'watchHour' is not populated.

Open ReformedDoge opened this issue 1 year ago • 2 comments

Description: "/stats?sport=lol" content-type changed to text/plain for some reason. This caused 'watchHour' to not be populated as expected. By updating the content-type check in the condition to include both "application/json" and "text/plain" packet types, this issue is resolved.

Affected file: NetworkHandler.py

ReformedDoge avatar May 10 '24 01:05 ReformedDoge

@Yudaotor, Screenshot_1

they reverted v1/history/stats?sport=lol back to "application/json". We can keep the change as is just in case they alter it again.

Regarding the code snippet:

if packetType != "application/json" and packetType != "text/plain":
                continue

This is my third time skimming through the code, so please excuse my limited knowledge. Is the check even necessary? It seems to work fine without it, as the try block already handles the checking for the paths

ReformedDoge avatar May 11 '24 17:05 ReformedDoge

@Yudaotor, Screenshot_1

they reverted v1/history/stats?sport=lol back to "application/json". We can keep the change as is just in case they alter it again.

Regarding the code snippet:

if packetType != "application/json" and packetType != "text/plain":
                continue

This is my third time skimming through the code, so please excuse my limited knowledge. Is the check even necessary? It seems to work fine without it, as the try block already handles the checking for the paths

its unnecessary.just filter some.ok then.I will merge this when next update.

Yudaotor avatar May 13 '24 01:05 Yudaotor