-
Notifications
You must be signed in to change notification settings - Fork 20
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
Match by hash in addition to filename #8
Comments
First things first: your utility's name is awesome 😎 Yes, you're right. It only matches file names and that's all. It's not out of scope per se, but it would indeed be an expansion over what this tool aimed to achieve in the first place. Which is not bad at all (feel free to open a PR if you want 😄). Now, yes, I have thought about matching with the hash (and I even attempted something). The only issue is that there's a huge variety of ways people can organize and archive ROMs and I found it to be a bit hard to code something that would allow most people to use it. As far as I could see, it would have to:
While this is all easy to do (except maybe ZIP files), it takes some testing to get it right, and I lack the time right now. |
Well, I kinda just did it. It was easier than I thought, tbh. |
Well, would you do the honors of testing what I made? 😉 |
I get the following error:
Running under Python 3.8.0. |
@ryanfb it should work now |
Thanks! Seems to work fine now. |
I have refined the hash processing and sped it up too. And I also fixed a couple issues with the copied files's names. I released it as 1.6.0 |
The first time I tried this utility, I was curious as to why it didn't find any matches, since DAT files have hash information—it seems like it only uses filenames to find matches in the DAT file. I looked briefly at just trying to make a pull request for this, but I'm not sure if you think it would be out of scope. Python does have SHA1 functionality in hashlib, so it shouldn't introduce an external dependency.
In the meantime, I've written a very simple companion utility that will use the SHA1 hashes in a DAT to copy files into a new directory with the correct filenames that this utility expects: https://github.com/ryanfb/copydatrom
The text was updated successfully, but these errors were encountered: