From a723d1752a71dba80a1e146fd3954d645a85f3df Mon Sep 17 00:00:00 2001 From: purexo <5005154+Purexo@users.noreply.github.com> Date: Sun, 2 Nov 2025 11:39:06 +0100 Subject: [PATCH] fix(EpicGames): also filter by the discount price --- src/crons/EpicGames.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crons/EpicGames.ts b/src/crons/EpicGames.ts index d65371c..a9c5ed5 100644 --- a/src/crons/EpicGames.ts +++ b/src/crons/EpicGames.ts @@ -101,6 +101,7 @@ interface EpicGamesProducts { urlSlug: string; price: { totalPrice: { + discountPrice?: number; fmtPrice: { originalPrice: string; }; @@ -205,6 +206,9 @@ export async function getOfferedGames( game.promotions?.promotionalOffers?.[0]?.promotionalOffers?.[0]; if (!promotion) return false; + const price = game.price.totalPrice.discountPrice; + if (price !== 0) return false; + const [startDate, endDate] = [ new Date(promotion.startDate), new Date(promotion.endDate),