Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed pg claim dlc crash #224

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

fixed pg claim dlc crash #224

wants to merge 11 commits into from

Conversation

zockol
Copy link

@zockol zockol commented Sep 23, 2023

code wasn't working for the new layout. swapped a few lines to collect loot again but there is still a bit to do.
i marked a line with //TODO (line 525) where the bot should post the code as console.log but i ran out of prime offers to test out the code. Also there was a bug with the unlinked stores that i just fixed temporarily by removing some other stuff about it (around line 521)

@wielorzeczownik
Copy link

I just don't understand why you replaced the single quotation mark with a double quotation mark generally generated unnecessary changes

@zockol
Copy link
Author

zockol commented Sep 24, 2023

that was my vs code addon, forget to disable it here

@vogler
Copy link
Owner

vogler commented Sep 24, 2023

Thanks, but please undo the unrelated syntactic changes first, otherwise it's hard to read what changed semantically.
https://semanticdiff.com may help.

prime-gaming.js Outdated Show resolved Hide resolved
prime-gaming.js Outdated
@@ -387,8 +403,9 @@ try {
} finally {
await db.write(); // write out json db
if (notify_games.length) { // list should only include claimed games

Copy link
Owner

Choose a reason for hiding this comment

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

Unrelated

notify(`prime-gaming (${user}):<br>${html_game_list(notify_games)}`);
}
}
if (page.video()) console.log('Recorded video:', await page.video().path())
await context.close();
await context.close();
Copy link
Owner

Choose a reason for hiding this comment

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

Unrelated

console.error(' Missing account linking:', unlinked_store, url);
dlc_unlinked[unlinked_store] ??= [];
dlc_unlinked[unlinked_store].push(title);
unlinked_store = await linkAccountButton.getAttribute("aria-label");
Copy link
Owner

Choose a reason for hiding this comment

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

Unrelated

prime-gaming.js Outdated
dlc_unlinked[unlinked_store].push(title);
unlinked_store = await linkAccountButton.getAttribute("aria-label");
console.debug(` Not able to claim. ${unlinked_store}`);
// console.debug(' LinkAccountButton label:', unlinked_store);
Copy link
Owner

Choose a reason for hiding this comment

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

Indentation seems messed up down from here.

@vogler
Copy link
Owner

vogler commented Sep 25, 2023

Ok, better to read now.

The only two relevant changes I see so far are changing the locator here: https://github.com/vogler/free-games-claimer/pull/224/files#diff-e35468b40bc179e267a0d50f7aa118eeaf03dcf676da75ac50a251b575c7c9bdR328-R330
and adding .first() here: https://github.com/vogler/free-games-claimer/pull/224/files#diff-e35468b40bc179e267a0d50f7aa118eeaf03dcf676da75ac50a251b575c7c9bdR350

The rest is commented out and partially duplicated code.

@zockol
Copy link
Author

zockol commented Sep 25, 2023

Yea thats about it. i commented stuff out because that code not works with the new one so far and i have only worked on the loot claiming yet.

This needs to be looked at. That should be a temp replacement for the old stuff. i mentioned that i ran out of offers to test so its commented until someone could approve https://github.com/vogler/free-games-claimer/pull/224/files#diff-e35468b40bc179e267a0d50f7aa118eeaf03dcf676da75ac50a251b575c7c9bdR375-R385

Copy link

sonarcloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants