Skip to content

Update roms_metadata virtual table #2083

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 8 commits into from
Jul 15, 2025
Merged

Update roms_metadata virtual table #2083

merged 8 commits into from
Jul 15, 2025

Conversation

gantoine
Copy link
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

The roms_metadata virtual table has fallen behind in recent releases (as we've added new providers), so this PR updates calculated fields accordingly.

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

@gantoine gantoine requested review from zurdi15 and Copilot July 15, 2025 16:04
Copy link

trunk-io bot commented Jul 15, 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
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

Updates several layers of metadata handling and display to bring the roms_metadata virtual table and related UI/model logic in line with newly added providers.

  • Multiply and conditionally render provider scores in the frontend.
  • Combine YouTube IDs and introduce new first_release_date and companies fields for Launchbox in backend models and handlers.
  • Add static IGDB platform and age‐rating maps and dedupe their definitions in the IGDB handler.
  • Provide an Alembic migration that recreates the roms_metadata view with updated calculations and fallbacks.

Reviewed Changes

Copilot reviewed 5 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/components/Details/Title.vue Multiply raw scores by 10/20 and wrap them in an optional template block.
backend/models/rom.py Combine IGDB and Launchbox YouTube IDs in one property.
backend/handler/metadata/launchbox_handler.py Extract first_release_date, parse YouTube URLs, and build companies list.
backend/handler/metadata/igdb_handler.py Introduce IGDB_PLATFORM_CATEGORIES, IGDB_AGE_RATING_ORGS, IGDB_AGE_RATINGS; remove duplicate block.
backend/alembic/versions/0045_roms_metadata_update.py Create or replace the roms_metadata view with new JSONB/JSON logic and rating multipliers.
Files not reviewed (11)
  • frontend/src/generated/index.ts: Language not supported
  • frontend/src/generated/models/Body_add_platform_api_platforms_post.ts: Language not supported
  • frontend/src/generated/models/Body_add_user_api_users_post.ts: Language not supported
  • frontend/src/generated/models/Body_delete_roms_api_roms_delete_post.ts: Language not supported
  • frontend/src/generated/models/Body_update_platform_api_platforms__id__put.ts: Language not supported
  • frontend/src/generated/models/Body_update_rom_api_roms__id__put.ts: Language not supported
  • frontend/src/generated/models/Body_update_rom_user_api_roms__id__props_put.ts: Language not supported
  • frontend/src/generated/models/PlatformSchema.ts: Language not supported
  • frontend/src/generated/models/RomLaunchboxMetadata.ts: Language not supported
  • frontend/src/generated/models/RomRAMetadata.ts: Language not supported
  • frontend/src/generated/models/UserForm.ts: Language not supported
Comments suppressed due to low confidence (2)

backend/models/rom.py:302

  • [nitpick] The variable lb_video_id could be renamed to launchbox_video_id for clearer intent and consistency with the other provider names.
        lb_video_id = (

backend/handler/metadata/launchbox_handler.py:75

  • The key "Released" may not match the actual API response field (previous code used "ReleaseDate"). Please verify that index_entry contains "Released" or adjust to the correct key.
            ).timestamp()

Copy link

github-actions bot commented Jul 15, 2025

Test Results

168 tests  ±0   168 ✅ ±0   38s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit bfdaf56. ± Comparison against base commit fd95ac0.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 15, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
7896 4983 63% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/handler/metadata/igdb_handler.py 70% 🟢
backend/handler/metadata/launchbox_handler.py 40% 🟢
backend/models/rom.py 91% 🟢
TOTAL 67% 🟢

updated for commit: bfdaf56 by action🐍

@gantoine gantoine merged commit ed5d5a2 into master Jul 15, 2025
10 checks passed
@gantoine gantoine deleted the 4-metadata-fixes-8 branch July 15, 2025 16:59
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.

1 participant