History

don't use cuebreakpoints; workaround for one-track albums

Fixes #27. Fixes #28.

Serge Ziryukin committed 10 years ago122

Commit 8a093091 parent 2bbf9551 file · +5 −4Browse files

Unified · Split

split2flac+5−4
@@ -68,7 +68,7 @@ unset PIC INPATH CUE CHARSET · 67 unmodified lines
6868 FORCE=0
6969
7070 # do not forget to update before commit
71−VERSION=121
71+VERSION=122
7272
7373 HELP="\${cG}split2flac version: ${VERSION}
7474 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
511511 esac
512512
513513 # split to tracks
514− # sed expression is a fix for "shnsplit: error: m:ss.ff format can only be used with CD-quality files"
515− cuebreakpoints "${CUE}" 2>/dev/null | \
516− sed 's/$/0/' | \
514+ # if there is only one track, we use shncue on the same file twice to make it
515+ # spit out one split point, which of course is the end of the first file
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}";) | \
517518 shnsplit -O never -o "${ENC}" -d "${OUT}" -t "%n" "${FILE}"
518519 if [ $? -ne 0 ]; then
519520 emsg "Failed to split\n"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t