-
-
Notifications
You must be signed in to change notification settings - Fork 259
Hopefully last batch of metadata fixes #2070
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 refactors the SteamGridDB metadata fetch flow, extends region preferences for ScreenScraper data, and adds JSON decode error handling in the ScreenScraper adapter.
- Replace single-name SGDB lookup with multi-name support in
scan_handler.py
- Extend preferred regions list for names, covers, and manuals in
ss_handler.py
- Promote
get_details_by_name
toget_details_by_names
insgdb_handler.py
and adjust logging - Add JSON decoding error handling in the ScreenScraper service
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
backend/handler/scan_handler.py | Refactored fetch_sgdb_details and updated SGDB integration |
backend/handler/metadata/ss_handler.py | Added "eu" and "jp" to region preference arrays |
backend/handler/metadata/sgdb_handler.py | Renamed lookup method, added iteration over multiple names, adjusted logs,/remove old method |
backend/adapters/services/screenscraper.py | Handle JSON parsing errors with explicit logging |
Comments suppressed due to low confidence (2)
backend/handler/scan_handler.py:576
- There's a typo in the variable name
sgdb_hander_rom
. It would be clearer to rename it tosgdb_handler_rom
to match the conventional spelling and maintain consistency.
sgdb_hander_rom = await fetch_sgdb_details()
backend/handler/scan_handler.py:554
- The new multi-name lookup logic for SGDB appears untested. Consider adding unit tests for cases where multiple metadata sources provide different game names.
async def fetch_sgdb_details() -> SGDBRom:
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Description
Explain the changes or enhancements you are proposing with this pull request.
Checklist
Please check all that apply.
Screenshots