From 075106da11ce4bb250a11a47ba232072e9546f1a Mon Sep 17 00:00:00 2001 From: Tymec Date: Sat, 18 May 2024 19:45:59 +0200 Subject: [PATCH 1/3] Update config.js --- src/config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.js b/src/config.js index bd41c7d1..4c32d59a 100644 --- a/src/config.js +++ b/src/config.js @@ -49,4 +49,6 @@ export const cfg = { // experimmental - likely to change pg_redeem: process.env.PG_REDEEM == '1', // prime-gaming: redeem keys on external stores pg_claimdlc: process.env.PG_CLAIMDLC == '1', // prime-gaming: claim in-game content + // external stores + lg_email: process.env.LG_EMAIL || process.env.PG_EMAIL || process.env.EMAIL, // legacy-games: email to use for redeeming }; From 8c535f48fa8f2de63fe32cf4a000b962c3a60e6b Mon Sep 17 00:00:00 2001 From: Tymec Date: Sat, 18 May 2024 19:47:18 +0200 Subject: [PATCH 2/3] Update prime-gaming.js --- prime-gaming.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prime-gaming.js b/prime-gaming.js index b555f670..2bd705f4 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -243,8 +243,8 @@ try { } } else if (store == 'legacy games') { await page2.fill('[name=coupon_code]', code); - await page2.fill('[name=email]', cfg.pg_email); // TODO option for sep. email? - await page2.fill('[name=email_validate]', cfg.pg_email); + await page2.fill('[name=email]', cfg.lg_email); + await page2.fill('[name=email_validate]', cfg.lg_email); await page2.uncheck('[name=newsletter_sub]'); await page2.click('[type="submit"]'); try { From c4ae3505b38f25361bf1a16ab2089fffc63e4d9f Mon Sep 17 00:00:00 2001 From: Tymec Date: Sat, 18 May 2024 19:50:13 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cfdddec2..14912579 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ Available options/variables and their default values: | GOG_EMAIL | | GOG email for login. Overrides EMAIL. | | GOG_PASSWORD | | GOG password for login. Overrides PASSWORD. | | GOG_NEWSLETTER | 0 | Do not unsubscribe from newsletter after claiming a game if 1. | +| LG_EMAIL | | Legacy Games: email to use for redeeming (if not set, defaults to PG_EMAIL) | See `src/config.js` for all options.