michael-n0813 / linux-idle-master

Linux version of idle-master, a simple script that emulates being in a steam game to unlock trading cards.
GNU General Public License v2.0
26 stars 8 forks source link

Script does not switch to the next game #16

Closed AxelTerizaki closed 1 year ago

AxelTerizaki commented 1 year ago

Hello !

Thanks for making this for Linux, it works fine, except for a little detail : whenever the current game being processed is done and there's no drops anymore for it, the script just goes to sleep and doesn't switch to the next game, I have to restart it.

Sample log :

[ 08/13/2023 11:04:10 PM ] Checking to see if App 257350 has remaining card drops
[ 08/13/2023 11:04:13 PM ] Suspending operation for App 257350
[ 08/13/2023 11:04:13 PM ] Closing game App 257350
[ 08/13/2023 11:04:13 PM ] App 257350 took 4:15:39 to idle.
[ 08/13/2023 11:04:13 PM ] Sleeping for 5 minutes.
[ 08/13/2023 11:09:14 PM ] Sleeping for 5 minutes.
[ 08/13/2023 11:14:15 PM ] Sleeping for 5 minutes.
[ 08/13/2023 11:19:16 PM ] Sleeping for 5 minutes.
[ 08/13/2023 11:24:17 PM ] Sleeping for 5 minutes.
[ 08/13/2023 11:29:17 PM ] Sleeping for 5 minutes.

Is there something I'm missing or is that a bug?

michael-n0813 commented 1 year ago

Hmmm, can you post "idlemaster.log" it should be located in the same folder where you ran the script. Seems to be working fine for me but with the big changes to steam lately weird thing are happening with the API calls. I will look into it some more tomorrow but for now I must sleep (longer than 5 mins sorry).

AxelTerizaki commented 1 year ago

Here's what's in the log as a game's card list is depleted :

[ 08/15/2023 05:59:28 PM ] Closing game App 1218210
[ 08/15/2023 05:59:28 PM ] Starting new HTTPS connection (1): store.steampowered.com:443
[ 08/15/2023 05:59:29 PM ] https://store.steampowered.com:443 "GET /api/appdetails/?appids=1218210&filters=basic HTTP/1.1" 200 2668
[ 08/15/2023 05:59:29 PM ] App 1218210 took 1:45:21 to idle.
[ 08/15/2023 05:59:29 PM ] Sleeping for 5 minutes.
[ 08/15/2023 06:04:29 PM ] Starting new HTTPS connection (1): steamcommunity.com:443
[ 08/15/2023 06:04:29 PM ] https://steamcommunity.com:443 "GET /profiles/76561197960342736/gamecards/1218210/ HTTP/1.1" 302 20
[ 08/15/2023 06:04:29 PM ] https://steamcommunity.com:443 "GET /id/axelterizaki/gamecards/1218210 HTTP/1.1" 200 10415
[ 08/15/2023 06:04:29 PM ] Sleeping for 5 minutes.

And so on until I CTRL+C and restart the script :)

michael-n0813 commented 1 year ago

I think this is a language issue, I saw your profile you live in France. I am guessing your set language for steam profile and your system locale is French? The script looks for keywords in English to check the status of the drops but numerical characters are same in any language so it can count the number of drops needed but get confused on the status once complete. Also API calls return in English because API is written in English so that would work as expected.

I tried setting my steam primary language to french and ran the script and yep it keeps looping 5 mins over and over. If you are able to temporally set you steam primary language to English and test the script again that would help me out.

And if that is the case I think I could rewrite it to be more compatible for foreign languages without too much work.

AxelTerizaki commented 1 year ago

Sure, I can try that. I've set my account language to english now and will wait until another game finishes dropping.

AxelTerizaki commented 1 year ago

Hello again :)

I confirm it works as intended if my account's language is set to English.

michael-n0813 commented 1 year ago

Thanks, awesome.

Should be able to work on a fix for this issue soon.

michael-n0813 commented 1 year ago

Updated script is up - v1.3.

Can you switch your language back to french and give it a run, a few other minor fixes in there too.

AxelTerizaki commented 1 year ago

Thank you :) I updated it and I'll see how it goes.

By the way, you should consider adding idlemaster.log to .gitignore as well as settings.txt as that causes conflicts when pulling. Ideally, settings.txt should be named settings.sample.txt so people can copy it to settings.txt when cloning :)

michael-n0813 commented 1 year ago

OK, updated again with .gitignore to ignore idlemaster.log, settings.txt and blacklist.txt. And then user can copy or rename settings-template.txt to settings.txt and that should be all good.

Good ideas :)

michael-n0813 commented 1 year ago

Closing due to inactivity. If you still an issues then please reopen. Thanks :)