tralph3 / Cue-Maker

A simple and easy to use program that fetches original cue files for your roms.
GNU General Public License v3.0
27 stars 7 forks source link

Feature Request: Zip file handling #2

Closed birdybro closed 4 years ago

birdybro commented 4 years ago

I was wondering if the ability to handle zips was possible to add someday in the future. Namely, I would love to update all of my multi-disc games with .m3u files automatically, but I have a huge set (all redumps of PSX currently out there) which entails a lot of manually unzipping running your cool script, then rezipping with proper name. I'm not much of a coder otherwise I'd fork yours and add it and suggest it, but seems pretty complicated. I think the process would be to check the zip files for the hash of files inside, handle them in your database the same way, but add a temporary unzip, create m3u, then rezip and cleanup step at the end.

tralph3 commented 4 years ago

So you want to unzip all your files, add the cues and m3u, and then rezip them right? Doesn't sound terribly complicated but I should look into it. I've learned a lot since I first created this script and even tho it's a small script it's already spaghetti code, and I cringe from looking at it lol. I'll consider it.

birdybro commented 4 years ago

Awesome! glad you are interested. Basically imagine if someone had every game in zip format from the redump datfile for PSX on a huge hard drive, and they wanted to make m3u's for all of them and have them rezip (this would change a 4disc separate zip to a single zip file btw, for instance). So like I have this:

Final Fantasy VII (USA) (Disc 1).zip Final Fantasy VII (USA) (Disc 1).bin Final Fantasy VII (USA) (Disc 1).cue

Final Fantasy VII (USA) (Disc 2).zip Final Fantasy VII (USA) (Disc 2).bin Final Fantasy VII (USA) (Disc 2).cue

Final Fantasy VII (USA) (Disc 3).zip Final Fantasy VII (USA) (Disc 3).bin Final Fantasy VII (USA) (Disc 3).cue

The script unzips them temporarily, does what your script normally does, and rezips all of them into:

Final Fantasy VII (USA).zip Final Fantasy VII (USA) (Disc 1).bin Final Fantasy VII (USA) (Disc 1).cue Final Fantasy VII (USA) (Disc 2).bin Final Fantasy VII (USA) (Disc 2).cue Final Fantasy VII (USA) (Disc 3).bin Final Fantasy VII (USA) (Disc 3).cue Final Fantasy VII (USA).m3u

That was my thinking, but I am terrible at this stuff lol...

tralph3 commented 4 years ago

I managed to implement this functionality, you may read the instructions in the README to see how to use it, nothing difficult.