Skip to content

Add how many keys were loaded from the .keys file, Added how many key…#3546

Merged
JustArchi merged 8 commits intoJustArchiNET:mainfrom
Knight1:showkeycount
Feb 5, 2026
Merged

Add how many keys were loaded from the .keys file, Added how many key…#3546
JustArchi merged 8 commits intoJustArchiNET:mainfrom
Knight1:showkeycount

Conversation

@Knight1
Copy link
Contributor

@Knight1 Knight1 commented Feb 5, 2026

…s were loaded into the queue.

Checklist

  • I read and understood the Contributing Guidelines.
  • This is not a duplicate of an existing merge request.
  • I believe this falls into the scope of the project and should be part of the built-in functionality.
  • My code follows the code style of this project.
  • I have added tests to cover my changes, wherever they are necessary.
  • All new and existing tests pass.

Changes

More logging on the background redeemer to understand what the redeemer is doing.
Specifically i now log how many keys were imported from the keys file since the gets removed if one key is imported. All other lines are discarded even if they contain keys.
When the redeemer starts, it now shows how many keys were loaded // are in the queue.

New functionality

2026-02-05 07:27:38|ArchiSteamFarm-203296|INFO|Bot-X|ImportKeysToRedeem() Successfully imported 1 key(s) from your .keys file, 1 Lines were skipped because they are not in the correct format.
2026-02-05 07:27:38|ArchiSteamFarm-203296|INFO|Bot-X|RedeemGamesInBackground() Starting...
2026-02-05 07:27:38|ArchiSteamFarm-203296|INFO|Bot-X|RedeemGamesInBackground() Loaded 1 key(s) from queue.
2026-02-05 07:27:38|ArchiSteamFarm-203296|DEBUG|Bot-X|RedeemGamesInBackground() Key: X-X-X| Status: Fail/DuplicateActivationCode | Items: [X, X]
2026-02-05 07:27:38|ArchiSteamFarm-203296|INFO|Bot-X|RedeemGamesInBackground() Done!

Additional info

Before it was not shown how many keys were imported and how many keys (or Lines) were ignored.
The only way to get the queue count was via a command line command.

@JustArchi JustArchi added the ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. label Feb 5, 2026
@JustArchi
Copy link
Member

JustArchi commented Feb 5, 2026

I don't like how this can be counter-intuitive. Parsing is actually made out of two parts, one is finding lines that parse to name + key, another is for filtering off the entries that are not keys. If user has file where 3 lines will be gibberish, 2 invalid entries, and 1 valid game, your code will say that 2 lines were skipped, which is not true.

Either count all lines at the beginning of the loop, compare with final amount of games, and based on that state how many were skipped, or count games alone and do not use "lines" word, to not confuse anybody. I think that first one makes far more sense.

@JustArchi JustArchi added the 🔧 Fixes required Issues marked with this label require further follow-up fixes before they can be considered. label Feb 5, 2026
Copy link
Member

@JustArchi JustArchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my comment

@Knight1
Copy link
Contributor Author

Knight1 commented Feb 5, 2026

I updated it so that the linecount is from the file itself. Also the Lines message is now only shown if there are lines with unparsable keys.

2026-02-05 20:48:38|ArchiSteamFarm-5525|INFO|Bot-X|ImportKeysToRedeem() Successfully imported 1 key(s) from your .keys file, 2 line(s) were skipped because they are not in the correct format, are comments or empty lines.
2026-02-05 20:48:11|ArchiSteamFarm-5525|INFO|Bot-X|ImportKeysToRedeem() Successfully imported 1 key(s) from your .keys file.
2026-02-05 20:48:11|ArchiSteamFarm-5525|INFO|Bot-X|RedeemGamesInBackground() Starting...
2026-02-05 20:48:11|ArchiSteamFarm-5525|INFO|Bot-X|RedeemGamesInBackground() Loaded 1 key(s) from queue.

Copy link
Member

@JustArchi JustArchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JustArchi JustArchi removed the 🔧 Fixes required Issues marked with this label require further follow-up fixes before they can be considered. label Feb 5, 2026
@JustArchi JustArchi merged commit c3a458f into JustArchiNET:main Feb 5, 2026
26 checks passed
@JustArchi
Copy link
Member

Thanks a lot for your continuous improvements to the ASF project, much appreciated! 🏆

@Knight1 Knight1 deleted the showkeycount branch February 5, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features.

Development

Successfully merging this pull request may close these issues.

2 participants