Skip to content

RetroDB v2.77.9

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Apr 18:33
· 220 commits to main since this release
  • routes/games.py Decomposition — Split the 2 472-line routes/games.py by extracting shared query helpers and the HLTB sub-API into dedicated modules. No behavior change — all 30 pytest cases still pass, ruff clean.
  • services/game_query.py (new) — Extracted query helpers used across the games blueprint: escape_like (SQL LIKE character escaping), _get_filter_options (60-second TTL cache for dropdown values), _build_games_query (the master WHERE/JOIN builder with filter, search, letter-nav, and source-source logic), get_retroachievements_info, get_trophy_info_for_game, get_bonus_discs_for_game. Also extracted the filter cache state and invalidate_filter_cache().
  • routes/games_hltb.py (new blueprint) — Extracted the four HLTB API endpoints (/api/hltb-lookup/<id>, /api/hltb-save/<id>, /api/hltb-clear/<id>, /api/hltb/search) into their own blueprint. URL paths are unchanged; endpoint names are now games_hltb.* (no template references needed updating since these are called from JS via fetch).
  • routes/games.py shrinks — Down from 2 472 to 2 000 lines (−19%). Combined with v2.77.8, app.py + routes/games.py have together dropped by about 1 450 lines, replaced by six cohesive service/blueprint modules totalling 1 540 lines — the codebase is cleaner to navigate without growing.