Skip to content

Exclude free games from search results - #7

Merged
BlasterAlex merged 8 commits into
mainfrom
claude/fix-missing-price-9Xtak
May 14, 2026
Merged

Exclude free games from search results#7
BlasterAlex merged 8 commits into
mainfrom
claude/fix-missing-price-9Xtak

Conversation

@BlasterAlex

@BlasterAlex BlasterAlex commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

Игры, у которых нет цены ни в одном регионе пользователя (бесплатные, демо, удалённые из магазина), больше не попадают в список результатов поиска. Ранее они отображались с ценой N/A.

Test plan

  • Поиск «Minecraft» — Minecraft Demo и Story Mode S2 Episode 1 не появляются в списке
  • Платные игры отображаются корректно
  • Игра, найденная только через fallback (get_game_info), но без цены — тоже не показывается
  • Все unit-тесты проходят: pytest tests/unit/

https://claude.ai/code/session_01GKfcq8EE1cMxAfJrKZLx72

claude added 3 commits May 14, 2026 20:02
_outright_price only matched CTAs where upSellService == "NONE" (the
string). Some regions return the field as null instead, causing the CTA
to be skipped and price to show as N/A even though the game is
purchasable. Accept null as equivalent to "NONE".

Also replace `/ divisor or None` with an explicit None-guard so that a
legitimately zero-valued discountedValue is preserved rather than
silently collapsed to None.

https://claude.ai/code/session_01GKfcq8EE1cMxAfJrKZLx72
Games where no region has a purchasable price (price=None in all
regions after search + fallback) are now filtered out from the list.
Previously they appeared with N/A prices (e.g. Minecraft Demo).

https://claude.ai/code/session_01GKfcq8EE1cMxAfJrKZLx72
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
config.py17170%1–2, 4, 7–11, 13, 16, 19–21, 24–27
bot
   __init__.py00100% 
   formatters.py93297%98–99
   main.py15150%1, 3–5, 7–10, 12, 15–16, 20–23
bot/handlers
   __init__.py70100% 
   regions.py825532%28, 31, 33–34, 36–37, 39–40, 44, 46–47, 55–57, 59–60, 68, 71, 73–75, 79, 81, 92–96, 101, 106–107, 114, 116–120, 122, 125, 127–128, 130, 132–133, 138, 145, 147, 150, 152, 154–156, 160, 162, 165
   search.py982970%45–46, 77, 116–117, 131–133, 135–136, 143–146, 151, 153–155, 157–160, 162–164, 166, 173–174, 176
   start.py11372%13–15
   subscriptions.py11281%11, 16
bot/keyboards
   __init__.py00100% 
   inline.py312325%11–15, 17, 21–22, 26–29, 33–34, 38–41, 45–46, 50–52
bot/middlewares
   __init__.py00100% 
   db.py11110%1, 3–5, 8–10, 12, 18–20
bot/states
   __init__.py00100% 
   subscription.py100100% 
db
   __init__.py00100% 
   base.py30100% 
   session.py770%1, 3, 5–6, 9–11
db/models
   __init__.py80100% 
   game.py110100% 
   notification.py130100% 
   price.py130100% 
   region.py120100% 
   subscription.py160100% 
   user.py120100% 
   user_region.py70100% 
services
   __init__.py00100% 
   currency.py401952%71–81, 86–91, 105–106
   notifier.py660%1, 4, 12–14, 18
   price.py90100% 
   ps_api.py201335%21–22, 24–27, 29–32, 39–41
   ps_store.py1682684%69, 99, 110, 118, 120, 123, 125–126, 128, 131, 135–136, 208, 231–233, 238–239, 246, 267–269, 280–281, 300–301
   region.py270100% 
   user.py110100% 
TOTAL76922870% 

@BlasterAlex BlasterAlex changed the title Fix missing prices in search results Exclude free games from search results May 14, 2026
@BlasterAlex
BlasterAlex merged commit 09d72db into main May 14, 2026
2 checks passed
@BlasterAlex
BlasterAlex deleted the claude/fix-missing-price-9Xtak branch May 15, 2026 15:37
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.

2 participants