-
-
Notifications
You must be signed in to change notification settings - Fork 249
Unify platform slugs #2143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify platform slugs #2143
Conversation
Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information. |
Test Results546 tests 545 ✅ 55s ⏱️ Results for commit 4e2bde2. ♻️ This comment has been updated with latest results. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR unifies platform slugs across the application by introducing a centralized UniversalPlatformSlug
enum and updating platform mappings to use consistent naming conventions. The changes standardize platform identifiers throughout the system, making them more maintainable and reducing inconsistencies.
- Introduces
UniversalPlatformSlug
enum to standardize platform identifiers across all metadata handlers - Updates platform mappings in all metadata handlers to use the centralized enum
- Simplifies platform slug naming by removing verbose descriptors (e.g., "genesis-slash-megadrive" → "genesis")
Reviewed Changes
Copilot reviewed 27 out of 62 changed files in this pull request and generated 10 comments.
Show a summary per file
File | Description |
---|---|
frontend/src/utils/index.ts | Updates EJS cores and control schemes mappings to use simplified platform slugs |
frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue | Changes IGDB URL to use igdb_slug instead of generic slug |
frontend/package.json | Updates OpenAPI generation endpoint port from 5000 to 3000 |
frontend/assets/platforms/ATTRIBUTIONS | Renames platform asset file references to match new slug format |
examples/config.es-de.example.yml | Updates ES-DE configuration with new unified platform mappings |
examples/config.batocera-retrobat.yml | Updates Batocera/RetroBat configuration with new platform mappings |
backend/utils/generate_supported_platforms.py | Refactors to use UniversalPlatformSlug enum instead of hardcoded mappings |
backend/models/platform.py | Adds igdb_slug and moby_slug properties, removes logo_path field |
backend/models/fixtures/known_bios_files.json | Updates BIOS file mappings to use new platform slugs |
backend/handler/scan_handler.py | Updates metadata source checks to use platform lists for validation |
backend/handler/metadata/tests/test_base_handler.py | Adds comprehensive test coverage for the new base handler functionality |
backend/handler/metadata/ss_handler.py | Updates Screenscraper handler to use UniversalPlatformSlug enum |
backend/handler/metadata/ra_handler.py | Updates RetroAchievements handler to use UniversalPlatformSlug enum |
backend/handler/metadata/moby_handler.py | Updates MobyGames handler to use UniversalPlatformSlug enum |
Files not reviewed (1)
- frontend/src/generated/models/PlatformSchema.ts: Language not supported
0802744
to
195749a
Compare
Description
Explain the changes or enhancements you are proposing with this pull request.
This monster of a PR organizes and centralizes all the platform slugs known to the various metadata handlers. By centralizing them all we can nearly guarantee we don't miss any slugs, mismatch the slugs with IDs, typo the keys or let extra invalid/duplicate slugs slip in.
I've also taken the opportunity to rename some of the slugs that were poorly named or confusing, and removing duplicate slugs. Migration
0046
handles updating both theslug
value in the platform model and updating the user'sconfig.yml
file with the right platform mapping.Note that mounting a config.yml file is now required in case we need to update it, and the app will fail to start if one isn't present.
Checklist
Please check all that apply.