-
-
Notifications
You must be signed in to change notification settings - Fork 247
Always hash the largest file in compressed multi file roms #2261
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. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
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 changes the hashing behavior for compressed multi-file ROMs to always hash the largest file in the archive instead of the first file. This ensures more consistent and meaningful hash generation for ROM identification.
- Modified archive processing functions to identify and extract the largest file by size
- Updated 7zip processing to return success/failure status and handle fallback to basic file reading
- Added early return optimization for badge downloads if file already exists
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
backend/utils/archive_7zip.py |
Refactored to find and extract the largest file instead of first file, added return status handling |
backend/handler/filesystem/roms_handler.py |
Updated zip and tar processing to select largest file, added fallback handling for 7zip processing |
backend/handler/filesystem/resources_handler.py |
Added check to skip badge download if file already exists |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
Explain the changes or enhancements you are proposing with this pull request.
Checklist
Please check all that apply.