Unified · Split
| @@ -238,7 +238,7 @@ METAFLAC="metaflac --no-utf8-convert" · 237 unmodified lines | |||
| 238 | VORBISCOMMENT="vorbiscomment -R -a" | 238 | VORBISCOMMENT="vorbiscomment -R -a" |
| 239 | command -v mid3v2 >/dev/null && ID3TAG="mid3v2" || ID3TAG="id3tag -2" | 239 | command -v mid3v2 >/dev/null && ID3TAG="mid3v2" || ID3TAG="id3tag -2" |
| 240 | MP4TAGS="mp4tags" | 240 | MP4TAGS="mp4tags" |
| 241 | GETTAG="cueprint -n 1 -t" | 241 | GETTAG="cueprint -n 1 -i cue -t" |
| 242 | VALIDATE="sed s/[^][[:space:][:alnum:]&_#,.'\"\(\)!-]//g" | 242 | VALIDATE="sed s/[^][[:space:][:alnum:]&_#,.'\"\(\)!-]//g" |
| 243 | 243 | ||
| 244 | # check & print output format | 244 | # check & print output format |
| @@ -286,7 +286,7 @@ update_pattern () { · 41 unmodified lines | |||
| 286 | 286 | ||
| 287 | # splits a file | 287 | # splits a file |
| 288 | split_file () { | 288 | split_file () { |
| 289 | TMPCUE="${HOME}/.split2flac_XXXXX.cue" | 289 | TMPCUE="${HOME}/.split2flac.cue.XXXXXX" |
| 290 | FILE="$1" | 290 | FILE="$1" |
| 291 | 291 | ||
| 292 | if [ ! -r "${FILE}" ]; then | 292 | if [ ! -r "${FILE}" ]; then |
| @@ -324,7 +324,7 @@ split_file () { · 31 unmodified lines | |||
| 324 | TMPCUE=$(mktemp "${TMPCUE}") | 324 | TMPCUE=$(mktemp "${TMPCUE}") |
| 325 | CUE="${TMPCUE}" | 325 | CUE="${TMPCUE}" |
| 326 | echo "${CUESHEET}" > "${CUE}" | 326 | echo "${CUESHEET}" > "${CUE}" |
| 327 | TMPCUE="${HOME}/.split2flac_XXXXX.cue" | 327 | TMPCUE="${HOME}/.split2flac.cue.XXXXXX" |
| 328 | 328 | ||
| 329 | if [ $? -ne 0 ]; then | 329 | if [ $? -ne 0 ]; then |
| 330 | emsg "Unable to save internal cue sheet\n" | 330 | emsg "Unable to save internal cue sheet\n" |
| @@ -434,7 +434,7 @@ split_file () { · 103 unmodified lines | |||
| 434 | 434 | ||
| 435 | # some cue sheets may have non-audio tracks | 435 | # some cue sheets may have non-audio tracks |
| 436 | # we can check the difference between what cuebreakpoints and cueprint gives us | 436 | # we can check the difference between what cuebreakpoints and cueprint gives us |
| 437 | BREAKPOINTS_NUM=$(($(cuebreakpoints "${CUE}" 2>/dev/null | wc -l) + 1)) | 437 | BREAKPOINTS_NUM=$(($(cuebreakpoints -i cue "${CUE}" 2>/dev/null | wc -l) + 1)) |
| 438 | 438 | ||
| 439 | # too bad, we can't fix that in a _right_ way | 439 | # too bad, we can't fix that in a _right_ way |
| 440 | if [ ${BREAKPOINTS_NUM} -lt ${TRACKS_NUM} ]; then | 440 | if [ ${BREAKPOINTS_NUM} -lt ${TRACKS_NUM} ]; then |
| @@ -543,12 +543,12 @@ split_file () { · 102 unmodified lines | |||
| 543 | 543 | ||
| 544 | i=1 | 544 | i=1 |
| 545 | while [ $i -le ${TRACKS_NUM} ]; do | 545 | while [ $i -le ${TRACKS_NUM} ]; do |
| 546 | TAG_TITLE=$(cueprint -n $i -t %t "${CUE}" 2>/dev/null) | 546 | TAG_TITLE=$(cueprint -n $i -i cue -t %t "${CUE}") |
| 547 | FILE_TRACK="$(printf %02i $i)" | 547 | FILE_TRACK="$(printf %02i $i)" |
| 548 | FILE_TITLE=$(echo "${TAG_TITLE}" | ${VALIDATE}) | 548 | FILE_TITLE=$(echo "${TAG_TITLE}" | ${VALIDATE}) |
| 549 | f="${OUT}/${FILE_TRACK}.${FORMAT}" | 549 | f="${OUT}/${FILE_TRACK}.${FORMAT}" |
| 550 | 550 | ||
| 551 | TAG_PERFORMER=$(cueprint -n $i -t %p "${CUE}" 2>/dev/null) | 551 | TAG_PERFORMER=$(cueprint -n $i -i cue -t %p "${CUE}" 2>/dev/null) |
| 552 | 552 | ||
| 553 | if [ -n "${TAG_PERFORMER}" -a "${TAG_PERFORMER}" != "${TAG_ARTIST}" ]; then | 553 | if [ -n "${TAG_PERFORMER}" -a "${TAG_PERFORMER}" != "${TAG_ARTIST}" ]; then |
| 554 | $msg "$i: $cG${TAG_PERFORMER} - ${TAG_TITLE}$cZ\n" | 554 | $msg "$i: $cG${TAG_PERFORMER} - ${TAG_TITLE}$cZ\n" |