Pandiora / SteamAccountRoboticAssistant

Chrome-Extension for enhancing and automating your Steam-Experience
Apache License 2.0
37 stars 8 forks source link

Add Widgets to Dashboard #4

Open Pandiora opened 7 years ago

Pandiora commented 7 years ago
Pandiora commented 7 years ago

Games added for all accounts would only make sense if there is an update on daily basis, since the real dates when games got added can only be retrieved through account-details OR daily update of our database via Steam-API. This would cause to much traffic for only creating a statistic-widget about when games got added.

I'm now focusing on Master-Account

Found out some Game-Titles on Account-Details-Page aren't matching the names provided by API and also some Titles include HTML-Entities.

Current fix to decode HTML-Entities:

function htmlDecode(string, pass){
    while(pass--){ string=jQuery('<div/>').html(string).text(); }
    return string;
}
htmlDecode("Tom Clancy&amp;amp;rsquo;s The Division&amp;amp;trade;", 3)

We need to repeat this step, since the Game-Titles got encoded with HTML-Entities multiple times.

Next step: Check for games in Database, get the Titles and try matching their length to titles we got form account-details. Remove white-spaces first, make them all upper-case and maybe find more matching titles, since "The Division" in example includes the Trademark-Symbol on Store-Page but not via Steam-API.

Pandiora commented 5 years ago

Since the Accountdetails-Page doesn't provide Appids, those games would only be Unique by their names. The current approach is to retrieve the detailed timestamps via Steam Support-Page - so we need one iteration for every game. That could cause a long BUT abortable and later restartable run, which saves the data after each item of the iteration. When in example all data got added after first run and the user adds 10 games right after, the next run will only scan those 10 added games.

So two widgets are almost complete now: