Cue-Maker | use program that fetches original cue files | Media library
kandi X-RAY | Cue-Maker Summary
kandi X-RAY | Cue-Maker Summary
A simple and easy to use program that fetches the original .cue files for your roms.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generate a new cue file
- Fetches the entry for a given entry name
- Create a generic cue file
- Compute sha1 hash of a file
- Get track number from an entry name
- Replace the file name in the cue text
- Create m3u file
- Compresses all files in the given folder
Cue-Maker Key Features
Cue-Maker Examples and Code Snippets
Community Discussions
Trending Discussions on Cue-Maker
QUESTION
sorry for the messy title but I can't come up with something that really describes what's happening here. So I'm making a program that fetches .cue files for Playstation 1 roms. To do this, the program creates a SHA-1 hash of the file and checks it in a database. The database can be found in the "psx.hash" file in this repo. This has been working fine but I suddenly stumbled upon a very very nasty problem. There's plenty of files that have the same hash, because they are essentially the same file.
Let me break down the problem a bit. PSX roms are essentially cd files, and they can come in tracks. These tracks usually contain audio, and the .cue file is used to tell the emulator where each audio track is located [in the disc file]. So what I do is to identify each and every track file (based on their SHA-1 hash), see if they match the database, and then construct a link based on their name (minus the track text) to get to the original cue file. Then I read the text and add it to the cue, simple as that. Well, apparently many games use the same track for some reason? Exactly 175 of them
So... what can I do to difentiate them? This leads to the problem that I fetch the wrong cue file whenever this hash comes into play. This is the hash by the way: "d9f92af296360772e62caa4cb276de3fa74f5538". I tried other algorithms to see if it was just an extremely unlikely coincidence, but nope, all gave the same results. SHA-256 gave the same result, CRC gave the same result, MD5 gave the same result (by the same result I mean the same between files, of course the results of different algorithms for the same file will be different). So I don't know what to do. This is a giant bug in my program that I have no idea on how to fix, any insight is welcome. I'm afraid I explained myself poorly, if so, I apologize, but I have a hard time seeing where I may not be clear enough, so if you have any doubts please, do ask.
It's worth noting that the database was not constructed by myself, but by redump.org, also, here's the code I'm using to retrieve the hashes of the files:
...ANSWER
Answered 2020-Dec-13 at 21:02The correct solution would be to construct the hash file in such a way that I can differentiate between track files for each game, but I ended up doing the following:
- Sort the list of Tracks to have them ordered.
- Get the first track file and retrieve the hash (this one will always be unique since it contains the game)
- For every next track file that isn't
Track 1
, assume it belongs to the game before it. So if the next file isTrack 2
, assume it belongs to the previous file that hadTrack 1
.
This nicely avoids the issue, although it's circumventing the bigger problem of not having properly formatted data.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Cue-Maker
You can use Cue-Maker like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page