-
-
Notifications
You must be signed in to change notification settings - Fork 247
Hasheous matching #1990
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
Hasheous matching #1990
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. |
44d0770
to
2b1297b
Compare
c02939e
to
28d9807
Compare
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 integrates the Hasheous API as an additional hash-based metadata provider, adding support for retrieving Hasheous and TGDB IDs and metadata that augment existing providers. Key changes include:
- Adding new environment variables, database fields, and indices for hasheous_id and tgdb_id.
- Updating scan handlers and response schemas to incorporate Hasheous metadata.
- Adjusting platform support mappings and related API endpoints to reference the new Hasheous settings.
Reviewed Changes
Copilot reviewed 42 out of 44 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
env.template | Added HASHEOUS_API_ENABLED configuration. |
backend/utils/generate_supported_platforms.py | Updated platform mapping for Xbox Series renaming. |
backend/models/rom.py & platform.py | Added fields and indices for hasheous_id and tgdb_id. |
backend/handler/scan_handler.py | Integrated Hasheous API in platform and ROM scanning logic. |
backend/handler/metadata/*.py | Added Hasheous handler and updated dependent metadata endpoints and response schemas. |
backend/endpoints/heartbeat.py, responses/*.py, config/init.py | Updated endpoints to include new Hasheous API support. |
backend/alembic/versions/0044_hasheous_id.py | Added migration to support new Hasheous fields. |
Files not reviewed (2)
- frontend/src/generated/index.ts: Language not supported
- frontend/src/generated/models/DetailedRomSchema.ts: Language not supported
Comments suppressed due to low confidence (1)
backend/handler/metadata/launchbox_handler.py:266
- The f-string uses nested double quotes around the 'FileName' key, which is likely to cause a syntax error. Consider using single quotes inside the f-string (e.g. best_cover.get('FileName')).
"acorn-archimedes": {"id": 74, "name": "Acorn Archimedes"},
Description
Explain the changes or enhancements you are proposing with this pull request.
This PR integrates the Hasheous API as a hash-based metadata provider. When given a set of hashes, it returns the Hasheous ID, and may return the IGDB, TGDB or RA IDs for that game, if the platform is known.
When enabled, calls to Playmatch and Hasheous happen before other metadata providers, and any returned IGDB/TGDB/RA IDs are used in their respective scanners, preempting calls to filename-based search endpoints.
In it's current form the integration only pulls IGDB/TGDB/RA IDs from hasheous and still requires a connection (i.e. API keys) for IGDB and RA to fetch game information. Future versions will also pull IGDB/RA data from the hasheous proxy once those proxy endpoints are feature complete and ready for use.
Checklist
Please check all that apply.
Screenshots