mame
mame copied to clipboard
refactor chdman extractcd to allow split .bin/.cue output
My partial solution to #5867 (only partial because it doesn't fix round-trip support fully, such as #10308).
Full list of things this does to chdman
:
- Adds a
-os
/--splitcue
option toextractcd
to force output to.cue
mode and output individual.bin
s, naming thembasename (Track n).bin
if there is more than 1 track.-
n
will be 1 digit if there are less than 10 tracks in the CD, 2 digits otherwise. -
.bin
will be replaced by the file extension specified by-ob
/--outputbin
if applicable. - Its short name is
-os
in case the existing-s
/--size
option is used forextractcd
in future.
-
- This new method also applies to
.gdi
output. Should I change this?- Output filenames will be different: no longer outputs audio files as
.raw
, format is as above instead of just appending the track number as 2 digits. - Deletes all bin files on error instead of just the last one before the error.
- The percentage of completion no longer resets to 0 for each track, so it will actually say near 100% at completion.
- Output filenames will be different: no longer outputs audio files as
- Checks output filename ends with
.cue
or.gdi
, case insensitive, instead of just doing a case sensitive search for them anywhere in the filename. - Removes unused
-ob
/--outputbin
option fromextractdvd
. - Updates its manpage, adding the missing
createdvd
andextractdvd
documentation too.
Tell me if any changes should be made :)
OK it's definitely ready for merge now! I fixed a regression I made in the 2nd commit!
Would it be possible to squash all the commits so it's easier to review?
done. you might want to run CI again
ok actually this doesn't work at all... i fix it tomorrow
Yeah, as far as I know there's no such thing as split CDRDAO (bin/toc) format.
The option is now --splitcue
and forces output to be in .bin
/.cue
mode, issuing a warning if -o
doesn't end with .cue
. Should it be an error instead?
I tested it, it works and is ready for merge other than that.
There is no split .toc
mode. Maybe I'll look into it further later.
The old broken version is at 70e8418b4f91135f6295a46842376d41f1866eaa.
re: .toc support I'm not sure if cdrdao supports extracting .tocs with each track as a new file, but the .toc format itself does support using multiple files. Here's an example from the official cdrdao website showing it off at the bottom: https://cdrdao.sourceforge.net/example.html#secret
closing in favour of #12191 :)