Add ES-DE <sortname> import and edit support for ROM ordering#3460
Open
Copilot wants to merge 3 commits into
Open
Add ES-DE <sortname> import and edit support for ROM ordering#3460Copilot wants to merge 3 commits into
<sortname> import and edit support for ROM ordering#3460Copilot wants to merge 3 commits into
Conversation
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for sortname tag in ES-DE gamelist.xml import
Add ES-DE May 31, 2026
<sortname> import support for ROM ordering
Member
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Add ES-DE
Add ES-DE May 31, 2026
<sortname> import support for ROM ordering<sortname> import and edit support for ROM ordering
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds ES-DE <sortname> support so imported ROMs can keep a display title while using a separate value for name-based ordering.
Changes:
- Adds
sort_nameto the ROM model, migration, API schemas, update endpoint, and frontend edit form. - Parses ES-DE
<sortname>fromgamelist.xmland persists it during scans. - Updates ROM name ordering logic and backend tests for sorting/import/update behavior.
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
backend/alembic/versions/0082_add_rom_sort_name.py |
Adds nullable roms.sort_name column. |
backend/models/rom.py |
Adds sort_name ORM field. |
backend/handler/database/roms_handler.py |
Uses sort_name as the effective name-sort key when present. |
backend/handler/metadata/base_handler.py |
Extends metadata ROM payload typing with sort_name. |
backend/handler/metadata/gamelist_handler.py |
Parses <sortname> into gamelist metadata and ROM data. |
backend/handler/scan_handler.py |
Initializes and preserves sort_name during scan updates. |
backend/endpoints/roms/__init__.py |
Accepts, updates, and clears sort_name through the ROM update endpoint. |
backend/endpoints/responses/rom.py |
Exposes sort_name in ROM response schemas. |
backend/tests/handler/test_db_handler.py |
Adds DB-level coverage for sort_name ordering. |
backend/tests/handler/metadata/test_gamelist_handler.py |
Adds parser coverage for <sortname>. |
backend/tests/endpoints/roms/test_rom.py |
Adds endpoint coverage for editing and clearing sort_name. |
frontend/src/services/api/rom.ts |
Includes sort_name in ROM update form data. |
frontend/src/components/common/Game/Dialog/EditRom.vue |
Adds editable Sort name field to the ROM dialog. |
frontend/src/locales/en_US/rom.json |
Adds English label for Sort name. |
frontend/src/locales/en_GB/rom.json |
Adds British English label for Sort name. |
frontend/src/__generated__/models/SimpleRomSchema.ts |
Regenerates frontend simple ROM schema with sort_name. |
frontend/src/__generated__/models/DetailedRomSchema.ts |
Regenerates frontend detailed ROM schema with sort_name. |
frontend/src/__generated__/models/Body_update_rom_api_roms__id__put.ts |
Regenerates update request schema with sort_name. |
Files not reviewed (3)
- frontend/src/generated/models/Body_update_rom_api_roms__id__put.ts: Language not supported
- frontend/src/generated/models/DetailedRomSchema.ts: Language not supported
- frontend/src/generated/models/SimpleRomSchema.ts: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "status-never-playing": "Never Playing", | ||
| "status-now-playing": "Now Playing", | ||
| "status-retired": "Retired", | ||
| "sort-name": "Sort name", |
|
|
||
| const fields: FormInputField<UpdateRomInput>[] = [ | ||
| ["name", rom.name], | ||
| ["sort_name", rom.sort_name], |
|
|
||
| class BaseRom(TypedDict): | ||
| name: NotRequired[str] | ||
| sort_name: NotRequired[str] |
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.
ES-DE
gamelist.xmlimports were ignoring<sortname>, so collections with Kanji/Hanzi titles could not preserve the intended library ordering. This change imports that field, uses it for ROM name sorting without changing the displayed title, and exposes it as an editable ROM field.Import ES-DE sort metadata
<sortname>fromgamelist.xmlsort_nameUse
sort_namefor orderingRom.sort_nameoverRom.namewhen ordering by namenameas the display title; only sort behavior changesPersist the new field
roms.sort_nameExpose
sort_namefor editingsort_namein ROM read/update API schemassort_nameto the ROM edit dialog so it can be changed manuallysort_namewhen metadata is unmatchedCover the new behavior
<sortname>sort_namewhen presentsort_nameWith this imported, the ROM still displays as
悪魔城ドラキュラ, but name sorting usesAkumajou Dracula. The imported sort title can also be reviewed and edited later from the ROM edit form.