History

error message with cueprint output if failed to get number of tracks

Serge Zirukin committed 16 years ago

Commit 390d89d1 parent a239ed21 file · +8 −0Browse files

Unified · Split

split2flac.sh+8−0
@@ -304,6 +304,14 @@ split_file () { · 303 unmodified lines
304304 TAG_ALBUM=$(${GETTAG} %T "${CUE}" 2>/dev/null)
305305 TRACKS_NUM=$(${GETTAG} %N "${CUE}" 2>/dev/null)
306306
307+ if [ -z "${TRACKS_NUM}" ]; then
308+ emsg "Failed to get number of tracks from CUE sheet."
309+ emsg "There may be an error in the sheet."
310+ emsg "Running ${GETTAG} %N \"${CUE}\" produces this:"
311+ ${GETTAG} %N "${CUE}"
312+ return 1
313+ fi
314+
307315 TAG_GENRE=$(awk '{ if (/REM[ \t]+GENRE[ \t]+(.*)/) { print $0; exit } }' < "${CUE}")
308316 TAG_GENRE=$(echo ${TAG_GENRE} | sed 's/REM[ \t]\+GENRE[ \t]\+//;s/"\(.*\)"/\1/')
309317

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