Repository navigation
RPCS3 compatibility for PS3 games, AI sales figures, edit-toggle and Achievements width fixes - #24
Merged
Merged
Conversation
… width fixes (3.34.0) RPCS3 compatibility - services/rpcs3_compat.py reads the local RPCS3's GuiConfigs/compat_database.dat (the rpcs3.net export RPCS3 downloads via Manage > Databases > Download Compatibility Database), re-read only when the file changes, and looks games up by disc serial. Never stored, never downloaded by RetroDB. Local PS3 ROMs only; imported games are skipped. - Shown on Library and console cards, the quick view and the game page; the game page hints how to get the list when RPCS3 has none. - Serials: PARAM.SFO for PSN/installed folders, and a serial in a file or folder name ([BLUS30443]); missing serials are read in the background. - _rpcs3_dirs also looks beside rpcs3.exe (Windows), in a portable folder and in macOS Application Support, matching RPCS3's get_config_dir(). Sales figures - games.units_sold (migration 023), asked of the AI in the scrape's gap-fill and in AI Fill, from free published sources; parse_units_sold() normalises "2.4 million", "~850k" and the like. Shown on the game page and in the quick view. AI Fill now uses AI_FILLABLE_FIELDS instead of a copy of it. Fixes - Franchise / Series and Platform Availability switches in the edit windows did nothing: their <label for> pointed at the hidden text input, not the checkbox. Their labels are now translated. - Achievements tabs each capped the page from their own card size (RA/Steam/Xbox 1463px, PSN 1563px, RPCS3 1845px); all now share .achievements-page's tokens. - AI Fill's rating inference called .strip() on integer columns. - Library card completion and score tooltips are translated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013s5ztLcay7qP1ezTvc85UA
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.
What
games.units_soldcolumn (migration 023). The AI is asked for it during a scrape's gap-fill and in AI Fill, using free published sources. The game page and the quick view show it.Why
All four were user requests. In the toggle bug, both switches'
<label class="toggle-switch" for="…">pointed at the text input instead of the checkbox it wraps. For a Standalone game that input is hidden, so a click was sent to a hidden field and the switch never changed. This affected every Standalone game, not only D-2. The Library's quick-edit modal had the same bug.The width bug: each tab's
grid-4cap came from its own card size. RA, Steam and Xbox capped at 1463px, PSN at 1563px and RPCS3 at 1845px.How
services/rpcs3_compat.pyreads<RPCS3 config dir>/GuiConfigs/compat_database.dat. I checked RPCS3's source (game_compatibility.cpp,settings.cpp,main_window.ui): this file holds the rawrpcs3.net/compatibility?api=v1&exportJSON, keyed by the serial with no dash (BLUS30443). RPCS3 downloads it only from Manage > Databases > Download Compatibility Database. RetroDB never downloads it. The status isn't stored; the file is re-read only when its mtime or size changes, and its path is looked up at most once a minute. When the file is missing, the game page explains how to get it.games.disc_serial(standalone_settings._disc_idsis now public asdisc_ids). The game page and quick view read a missing serial on demand. A Library or console page with unread PS3 serials starts one background thread to fill them in.disc_serialnow also readsPARAM.SFOfor PSN and installed folders, and a serial in the file or folder name ([BLUS30443])._rpcs3_dirsnow matches RPCS3'sfs::get_config_dir(): aportable/folder beside the program, the program's own folder (Windows) and macOS Application Support. Per-game RPCS3 settings on Windows and macOS benefit from this too.parse_units_sold()normalises answers like "2.4 million", "~850k" and "2,400,000". The value goes through the same fill-onlyCOALESCEpath as the scores. I looked for a free sales API: Wikidata's "units sold" (P2664) is mostly cross-platform totals and couldn't be reached to test from the session, so I didn't add it..achievements-pageand share its card tokens..strip()on integer columns, which crashed for a game with a score but no age rating.AI_FILLABLE_FIELDS.Version / changelog: this opens 3.34.0. PRs 21–23 already push the open 3.33.0 entry past the 10-item limit, so this work doesn't add to it. When those merge first, expect a small conflict here in
config.example.py(APP_VERSION/APP_LAST_UPDATE) and at the top ofdata/changelog.yaml. Resolve it by keeping both entries, 3.34.0 above 3.33.0. The 3.34.0 entry is not yet in the 20 per-locale changelogs (3.33.0 isn't either); those go in at release time, as was done for 3.32.0.Mandatory-workflow checklist
config.example.py(APP_VERSION3.34.0 +APP_LAST_UPDATE).config.pyis untracked.data/changelog.yamlmain)units_soldand RPCS3 compatibility. No routes, templates or bundles were added.check_i18n_fresh.pypasses.retrodb.speclists migration 023.Verification
pytestfull suite,ruff check .,node --checkon the changed JS, andscripts/ci_local.sh --docs. New tests:tests/test_rpcs3_compat.py,tests/test_units_sold.py, plus PARAM.SFO and file-name cases intests/test_disc_serial.py.[BLUS30443]and[BCES00797]folders, one with no serial, one PSN-imported row) and a fake RPCS3 config folder. Checked with Playwright at 1600px and 375px:Generated by Claude Code