Citrinate / FreePackages

An ASF plugin for finding and redeeming free Steam games
Apache License 2.0
87 stars 2 forks source link

Are packages with "Status: Invalid" remembered by the plugin? #1

Closed woctezuma closed 9 months ago

woctezuma commented 9 months ago

Thank you for the plugin!

Some licenses return Status: Invalid when trying to be added to the bot account. Here is an example:

2023-09-30 23:19:20|dotnet-10064|INFO|Bot|ClaimFreeApp() ID: app/1924920 | Status: Invalid
2023-09-30 23:19:25|dotnet-10064|INFO|Bot|ClaimFreeApp() ID: app/2622470 | Status: Invalid
2023-09-30 23:19:31|dotnet-10064|INFO|Bot|ClaimFreeSub() ID: sub/681037 | Status: OK/NoDetail
2023-09-30 23:19:37|dotnet-10064|INFO|Bot|ClaimFreeApp() ID: app/2606230 | Status: OK | Items: app/2606230, sub/935177
2023-09-30 23:19:43|dotnet-10064|INFO|Bot|ClaimFreeApp() ID: app/2501340 | Status: Invalid
2023-09-30 23:19:48|dotnet-10064|INFO|Bot|ClaimFreeApp() ID: app/2488870 | Status: Invalid

I wonder if these packages are remembered by the plugin so as not to try them again later. Or whether it is better not to remember them, in case their Status changes to a valid state in the foreseeable future.

woctezuma commented 9 months ago

Or whether it is better not to remember them, in case their Status changes to a valid state in the foreseeable future.

This.

First, timestamps are stored ìn Bot_FreePackages.db, but not the invalid status. So the file is solely used for the rate limit.

Second, I realize the project scope: the plugin listens for changes since the last Changenumber stored in FreePackages.cache. So there is no list to maintain, because the plugin listens for a change which may render valid one of these currently unavailable free packages. Storing the invalid packages in a list to skip them the next time would defeat one of the plugin objectives.

This plugin works by listening for changes to Steam's PICS. Since PICs doesn't show changes that happened before a certain time, the plugin may not discover all previously released free packages. It's also possible to miss newly released free packages if your bot is logged out for extended periods of time.

PICS stands for Product Info Cache Server. This is the system that Steam uses to hold information about applications and packages. If you've heard of appinfo, that information comes from PICS.

Citrinate commented 9 months ago

It doesn't remember these.

I wonder if these packages are remembered by the plugin so as not to try them again later. Or whether it is better not to remember them, in case their Status changes to a valid state in the foreseeable future.

In my testing I did try something like this. If an App returned "invalid" I wouldn't retry it for 1 hour, but even with a 1 hour limit I was starting to miss packages. So yes, I figured it was better to get these errors than to miss packages.

While the errors are persistent and a little annoying, it seems like there's few enough of them per hour that they won't prevent the plugin from working properly.

woctezuma commented 9 months ago

Thank you for your reply!