-
-
Notifications
You must be signed in to change notification settings - Fork 250
Add TheGamesDB handler for platforms #1994
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
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. |
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 adds support for a TheGamesDB (TGDB) metadata handler and wires it through environment/configuration, the backend scan logic, and heartbeat endpoints.
- Introduces a
TGDB_API_ENABLED
flag across frontend, backend config, and heartbeat responses - Registers
TGDBHandler
in the metadata factory and integrates TGDB lookups inscan_platform
- Updates platform slug mappings for “amstrad-gx4000” in LaunchBox and IGDB handlers
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
frontend/src/stores/heartbeat.ts | Added default TGDB_API_ENABLED flag |
env.template | Declared TGDB_API_ENABLED environment variable |
backend/config/init.py | Loaded TGDB_API_ENABLED from env |
backend/endpoints/heartbeat.py | Exposed TGDB_API_ENABLED in heartbeat payload |
backend/endpoints/responses/heartbeat.py | TypedDict updated with TGDB_API_ENABLED |
backend/handler/scan_handler.py | Imported TGDB handler and merged platform data |
backend/handler/metadata/init.py | Registered TGDBHandler |
backend/handler/metadata/launchbox_handler.py | Renamed “gx4000” slug to “amstrad-gx4000” |
backend/handler/metadata/igdb_handler.py | Added “amstrad-gx4000” slug entry |
backend/handler/metadata/ra_handler.py | Renamed SLUG_TO_RA_ID to RA_PLATFORM_LIST |
backend/handler/filesystem/roms_handler.py | Updated RA slug import and references |
Files not reviewed (1)
- frontend/src/generated/models/MetadataSourcesDict.ts: Language not supported
Comments suppressed due to low confidence (2)
backend/handler/scan_handler.py:161
- The integration of the TGDB handler in scan_platform lacks unit tests to verify that TGDB_API_ENABLED toggles behavior correctly and that platform attributes are merged properly. Please add tests covering both enabled and disabled scenarios.
tgdb_platform = (
backend/handler/metadata/init.py:9
- Ensure that the tgdb_handler.py file is included in this PR and implements TGDBHandler; otherwise this import will fail at runtime.
from .tgdb_handler import TGDBHandler
Description
Explain the changes or enhancements you are proposing with this pull request.
While TheGamesDB (https://thegamesdb.net) essentially has no public API anymore, it still has a lot of good information and assets for retro systems. In this PR I've pulled in a bunch of data for each platform in their DB (description, manufacturer, etc) so we can have access to it for future use. This PR doesn't fetch any game information or display TGDB as an option on the scan page, so in its current form it does nothing.
Checklist
Please check all that apply.