Skip to content

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

Merged
merged 20 commits into from
Jun 17, 2025
Merged

Hasheous matching #1990

merged 20 commits into from
Jun 17, 2025

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Jun 16, 2025

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.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots

Screenshot 2025-06-15 at 11 10 13 PM Screenshot 2025-06-17 at 11 40 58 AM

Copy link

trunk-io bot commented Jun 16, 2025

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.

Copy link

github-actions bot commented Jun 16, 2025

Test Results

92 tests  ±0   92 ✅ ±0   29s ⏱️ -1s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 8cc08ae. ± Comparison against base commit b1aa232.

♻️ This comment has been updated with latest results.

@gantoine gantoine force-pushed the hasheous-matching branch from 44d0770 to 2b1297b Compare June 16, 2025 18:28
@gantoine gantoine requested a review from Copilot June 17, 2025 02:30
@gantoine gantoine marked this pull request as ready for review June 17, 2025 02:30
Copilot

This comment was marked as outdated.

@gantoine gantoine requested review from adamantike and zurdi15 June 17, 2025 15:57
@gantoine gantoine force-pushed the hasheous-matching branch from c02939e to 28d9807 Compare June 17, 2025 16:18
@gantoine gantoine requested a review from Copilot June 17, 2025 16:28
Copy link
Contributor

@Copilot Copilot AI left a 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"},

@gantoine gantoine merged commit d39614e into master Jun 17, 2025
10 checks passed
@gantoine gantoine deleted the hasheous-matching branch June 17, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants