-
-
Notifications
You must be signed in to change notification settings - Fork 255
Cleanup lingeting t_thumb in cover and screenshto art #1940
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 removes lingering t_thumb
suffixes from cover and screenshot URLs, refactors RA metadata assignment in the socket-based scan endpoint, and drops commented-out background scan code.
- Adds an Alembic migration to replace
t_thumb
witht_1080p
inurl_cover
andt_720p
inurl_screenshots
- Updates
_identify_rom
logic to requirera_id
, guardra_metadata
, and convert it to a new dict - Cleans up a minor comment and removes dead code in scan handlers
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
backend/handler/scan_handler.py | Minor blank-line removal and corrected conjunction in a comment |
backend/endpoints/sockets/scan.py | Enforce ra_id presence, safer ra_metadata handling, removed dead code |
backend/alembic/versions/0041_assets_t_thumb_cleanup.py | Migration to clean up t_thumb suffixes in existing asset URLs |
Comments suppressed due to low confidence (1)
backend/endpoints/sockets/scan.py:506
- The new
ra_metadata
branching logic isn't covered by existing tests. Add unit tests for cases wherera_metadata
isNone
and where it contains anachievements
array to verify both paths.
ra_metadata = ra_handler_rom.get("ra_metadata", None)
badge_url = a.get("badge_url", None) | ||
badge_path = a.get("badge_path", None) | ||
if badge_url and badge_path: | ||
await fs_resource_handler.store_badge(badge_url, badge_path) |
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.
This is just some defensive coding, behaviour should be the same
Description
Explain the changes or enhancements you are proposing with this pull request.
Lingering
t_thumb
values inurl_cover
andurl_screenshots
will cause romm to overrite cover and screenshot art with thumbnails on partial scans. This replaces all uses oft_thumb
in those fields witht_1080p
for covers andt_720p
for screenshots. Tested on both mariadb and postgres locally.Some
cover_url
fields inigdb_metadata
might still uset_thumb
and would still be affected, but there's no easy way top clean those up through SQL.Checklist
Please check all that apply.
Screenshots