TheMetalCenter / m4b-mp3-chapters-from-cuesheets

merge audiobooks or podcasts without re-encoding (remuxing only) to single m4b with quicktime/nero chapters or mp3 with id3v2 chapters using cuesheets; also allows for renaming/editing chapters
23 stars 0 forks source link

Add check for incorrect formatting during conversions of txt and cue files #2

Closed TheMetalCenter closed 2 years ago

TheMetalCenter commented 2 years ago

Example: Check for HH:MM:SS (which must be MM:SS) in tracklist text file before conversion to .cue Check for starting TITLE field in .cue before conversion to metadata.txt

TheMetalCenter commented 2 years ago

The following seems to work for checking for HH:MM:SS format, and adds a TITLE field to cue sheet (still might find a way to check for one before cue2ffmeta is run. Will update code after more testing.

::The following will check for improper format of export tracklist @ECHO OFF rxrepl.exe -f export.txt -o formatcheck.txt -s "0.\:..\:.." -r "WARNING" findstr /m "WARNING" formatcheck.txt if %errorlevel%==0 (echo WARNING: Unable to convert properly. Please check your exported tracklist for improper HH:MM:SS format and convert them to MM:SS) if %errorlevel%==0 (pause) if %errorlevel%==0 (del formatcheck.txt) if %errorlevel%==0 (EXIT \B) if %errorlevel%==1 (echo No warnings found, continuing...)

TextToCue.exe "export.txt"

::The following is to add a placeholder TITLE field to prevent ffmpeg from confusing first chapter's title with the whole file's title @ECHO OFF :: Store the string you want to prepend in a variable and copy the contents into a temp file SET "text=TITLE "Title"" type export_new.cue > temp.txt :: Overwrites the file with the contents in "text" variable echo %text% > export_new.cue :: Appends the old contents & deletes the temporary file type temp.txt >> export_new.cue del temp.txt

TheMetalCenter commented 2 years ago

Removed this feature partially since autoconverts now