Use CheapShark's native 0-10 scale for MIN_DEAL_RATING

The previous 0-100 scale with a * 10 conversion was confusing —
CheapShark returns deal ratings as floats (e.g. 9.8, 7.5) so the
config should match. Default is now 8.0 instead of 80.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
This commit is contained in:
Claude
2026-02-28 02:21:24 +00:00
parent 3138fe314f
commit 88377e258a
4 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ async def fetch_deals(
if savings < min_discount:
continue
if rating * 10 < min_rating: # dealRating is 0-10, config is 0-100
if rating < min_rating:
continue
steam_app_id = d.get("steamAppID") or None

View File

@@ -15,7 +15,7 @@ class Config:
self.itad_api_key = os.environ.get("ITAD_API_KEY", "")
# Deal filtering
self.min_deal_rating = int(os.environ.get("MIN_DEAL_RATING", "80"))
self.min_deal_rating = float(os.environ.get("MIN_DEAL_RATING", "8.0"))
self.min_discount_percent = int(os.environ.get("MIN_DISCOUNT_PERCENT", "50"))
self.max_price_usd = float(os.environ.get("MAX_PRICE_USD", "20"))