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
27 stars 8 forks source link

sorting: add a random sorting option #18

Closed jjmcdn closed 1 year ago

jjmcdn commented 1 year ago

One of the games in my list was taking a very long time to provide drops, so I just quickly added this 'random' sort option.

michael-n0813 commented 1 year ago

Hey joe,

What would be the point of a random list vs an unsorted list? I just think the sort feature is intended to organize the list of game in a certain way and random is not very well... certain.

If you want to temporally skip a game you can add blacklist.txt to the directory and add the gameID to skip idling a game that may be taking too long.

Perhaps I'm missing the point? What do you think? I'm not against the option but don't want to add more code and changes if not necessary.

jjmcdn commented 1 year ago

Hey, thanks for the response. It's a good question that maybe I didn't explain well at first. The unsorted list is predictable (at least it was for me when I was testing it). With unsorted one game, the same one, would always be idled first and for whatever reason that game is not giving drops for me (No Man's Sky, in case your wondering). So I looked into the sort option and when I idled a different game first everything was fine (still no joy with NMS, but that's neither here nor there). So my first instinct was to make the default random rather than "whatever order the query returns them in", since it seems to always be the same order, but I didn't want to change the default behaviour, I'd just like a different default.

I'm perfectly happy to rework this as a 'random order as default' if you think that's useful and more sensible than providing a 'random' sort option. I also don't mind if you don't want to integrate the change at all. It's all cool. :-)

michael-n0813 commented 1 year ago

I see, yeah if a game is not dropping cards for whatever reason it won't move on to idle other games.

But I would think the best answer would be to blacklist that game and problem solved.

I think making a user input menu for keyboardInterrupt (Ctrl-C) would be better, then you can have lots of options of what to do, something like:

Idling interrupted by user! Awaiting key press....
q = Quit
r = Resume idling
s = Skip game (skip idling this game, sort of temporally blacklist)
b = Blacklist game (add gameid to blacklist.txt)
michael-n0813 commented 1 year ago

Check out the new update v2.1

it should allow you to skip or blacklist any game that's taking too long or not dropping via the options menu.

Would that be ok instead?

jjmcdn commented 1 year ago

Check out the new update v2.1

it should allow you to skip or blacklist any game that's taking too long or not dropping via the options menu.

Would that be ok instead?

Sure, that works for me. Thanks!