Fix game title update logic for non-ASCII titles on new subscription#19
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
non-ASCII by str.isascii(), blocking updates like "Spider-Man™"
replacing a stored non-ASCII title. Fix by stripping marks before check.
canonical title replaces a stored non-ASCII title even when the
canonical title is also non-ASCII.
https://claude.ai/code/session_011PnVRsKnQzEYLDAgC7N93n