Fixes #27. Fixes #28.
Unified · Split
| @@ -68,7 +68,7 @@ unset PIC INPATH CUE CHARSET · 67 unmodified lines | |||
| 68 | FORCE=0 | 68 | FORCE=0 |
| 69 | 69 | ||
| 70 | # do not forget to update before commit | 70 | # do not forget to update before commit |
| 71 | VERSION=121 | 71 | VERSION=122 |
| 72 | 72 | ||
| 73 | HELP="\${cG}split2flac version: ${VERSION} | 73 | HELP="\${cG}split2flac version: ${VERSION} |
| 74 | Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming. | 74 | Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming. |
| @@ -511,9 +511,10 @@ split_file () { · 436 unmodified lines | |||
| 511 | esac | 511 | esac |
| 512 | 512 | ||
| 513 | # split to tracks | 513 | # split to tracks |
| 514 | # sed expression is a fix for "shnsplit: error: m:ss.ff format can only be used with CD-quality files" | 514 | # if there is only one track, we use shncue on the same file twice to make it |
| 515 | cuebreakpoints "${CUE}" 2>/dev/null | \ | 515 | # spit out one split point, which of course is the end of the first file |
| 516 | sed 's/$/0/' | \ | 516 | # otherwise shnsplit would tell us there are no split points in the cue sheet |
| 517 | ([ ${TRACKS_NUM} -eq 1 ] && shncue -s "${FILE}" "${FILE}" || cat "${CUE}";) | \ | ||
| 517 | shnsplit -O never -o "${ENC}" -d "${OUT}" -t "%n" "${FILE}" | 518 | shnsplit -O never -o "${ENC}" -d "${OUT}" -t "%n" "${FILE}" |
| 518 | if [ $? -ne 0 ]; then | 519 | if [ $? -ne 0 ]; then |
| 519 | emsg "Failed to split\n" | 520 | emsg "Failed to split\n" |