-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Rom file and hashing refactor #1369
base: master
Are you sure you want to change the base?
Conversation
fb79d55
to
bb7913e
Compare
"xbox-360", | ||
"xboxone", | ||
) | ||
) |
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.
moved the location of this list and populated it with more platforms
category | ||
for category in RomFileCategory | ||
if category_matches(category.value, path_parts_lower) |
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.
For a future improvement, I think the way a category matches should be configurable by the user. They could provide a mapping in case they prefer to use a different term for each category.
First example that comes to mind is a different language: patch: "parche"
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.
Sure something to look into, but if we're already being strict about the filesystem structure there's no reason we can't mandate specific names for DLC/folders/etc.
def full_path(self) -> str: | ||
return f"{self.file_path}/{self.file_name}" |
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.
nit: This could return a Path
, and use a notation like Path(self.file_path) / self.file_name
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.
Amazing work, looking forward to everything this change unblocks! 🚀
Thanks for the review! I think we should release a patch version in a couple days with the fixed we have in the pipeline, then I'll merge this in. That way this won't block anything if something major is found. |
Alright this bad boy is ready for review! The gist of changes can be found in the migration file, but basically this PR:
RomFile
and migratesrom.files
over to itfile_*
columns onRom
tofs_*
, to clarify that these are filesystem propertiesI've also cleaned up a lot of pylint errors, added extra checks all over the place for bad data/states, and added
HASH_SCAN
as a scan type in the UI.