Skip to content

Fix game title update logic for non-ASCII titles on new subscription#19

Merged
BlasterAlex merged 4 commits into
mainfrom
claude/game-title-updates-non-ascii-UqXFo
Jun 6, 2026
Merged

Fix game title update logic for non-ASCII titles on new subscription#19
BlasterAlex merged 4 commits into
mainfrom
claude/game-title-updates-non-ascii-UqXFo

Conversation

@BlasterAlex

Copy link
Copy Markdown
Owner
  • Title with trademark symbols (™, ®, ©) was incorrectly treated as
    non-ASCII by str.isascii(), blocking updates like "Spider-Man™"
    replacing a stored non-ASCII title. Fix by stripping marks before check.
  • Add condition: if en-us is among the subscription's regions, its
    canonical title replaces a stored non-ASCII title even when the
    canonical title is also non-ASCII.
  • Add four integration tests covering the new cases.

https://claude.ai/code/session_011PnVRsKnQzEYLDAgC7N93n

claude added 4 commits June 3, 2026 13:54
- Title with trademark symbols (™, ®, ©) was incorrectly treated as
  non-ASCII by str.isascii(), blocking updates like "Spider-Man™"
  replacing a stored non-ASCII title. Fix by stripping marks before check.
- Add condition: if en-us is among the subscription's regions, its
  canonical title replaces a stored non-ASCII title even when the
  canonical title is also non-ASCII.
- Add four integration tests covering the new cases.

https://claude.ai/code/session_011PnVRsKnQzEYLDAgC7N93n
…itles

The worker called get_game_info per game_region and unconditionally set
gr.game.title = game_info.title. When a uk-ua or ru-ru region was checked
after en-us, the localized non-ASCII title overwrote the stored ASCII title.

Fix: only update the title when the new title is effectively ASCII (trademark
symbols stripped). Non-ASCII localized titles from regional checks are silently
ignored, preserving any previously stored ASCII title.

Also move is_effectively_ascii to services/ps_store.py so both subscription
and price_check share the same logic without duplication.

https://claude.ai/code/session_011PnVRsKnQzEYLDAgC7N93n
Price check only needs to update price-related fields. Updating title,
cover_url, game_type, and platforms from a per-region API call caused
localized titles (e.g. uk-ua) to overwrite stored ASCII titles.

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

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
config.py19384%27–29
bot
   __init__.py00100% 
   formatters.py1040100% 
   main.py17170%1, 3–6, 8–11, 13, 16–18, 22–25
   metrics.py90100% 
bot/handlers
   __init__.py70100% 
   regions.py845633%29, 32, 34–35, 37–38, 40–41, 45, 47–48, 56–58, 60–61, 69, 72, 74–76, 80, 82, 93–97, 102, 107–108, 115, 117–121, 123, 126, 128–129, 131, 133–134, 138, 140, 147, 149, 152, 154, 156–158, 162, 164, 167
   search.py140397%155, 190–191
   start.py11372%13–15
   subscriptions.py835731%23, 25–26, 28–32, 34–36, 38–39, 41–44, 46–47, 53, 61–63, 65–68, 70–71, 73, 78, 89, 91, 94–95, 97–99, 101, 108–109, 111, 118, 125, 128–132, 139–141, 144–148
bot/keyboards
   __init__.py00100% 
   inline.py542161%11–15, 17, 21–22, 26–29, 33–34, 44–47, 80–82
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.py7271%10–11
db/models
   __init__.py80100% 
   game.py190100% 
   game_region.py200100% 
   price_drop.py120100% 
   region.py130100% 
   subscription.py130100% 
   user.py120100% 
   user_region.py90100% 
services
   __init__.py00100% 
   currency.py400100% 
   notifier.py110100% 
   price.py170100% 
   ps_api.py201335%21–22, 24–27, 29–32, 39–41
   ps_store.py236398%233–234, 365
   region.py320100% 
   subscription.py1650100% 
   user.py140100% 
worker
   __init__.py00100% 
   main.py21210%1, 3–8, 10–12, 14, 17–19, 24–29, 31
   metrics.py80100% 
worker/tasks
   __init__.py00100% 
   notify.py540100% 
   price_check.py590100% 
TOTAL134221084% 

@BlasterAlex BlasterAlex merged commit 97c499b into main Jun 6, 2026
2 checks passed
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