[cmd_import_images] Fixed uknown chk_integrity function
[import_src] Fixed detection of cover image
This commit is contained in:
parent
c2938037e6
commit
f5af87ef24
2 changed files with 6 additions and 4 deletions
|
@ -28,7 +28,7 @@ cmd_import_images() {
|
|||
for cue in ${cueList[@]}; do
|
||||
_msg EXEC "Consolidating ${cue}"
|
||||
for var in IMG CUE ACCURIP LOG COVER; do unset ${var}; done
|
||||
for ext in flac cue accurip log jpg; do
|
||||
for ext in flac cue accurip log; do
|
||||
local file=$(sed "s|cue|${ext}|" <<< ${cue})
|
||||
[[ ! -f "${file}" ]] && continue
|
||||
case ${ext} in
|
||||
|
@ -42,9 +42,11 @@ cmd_import_images() {
|
|||
|
||||
(accurip) local ACCURIP="${file}" ;;
|
||||
(log) local LOG="${file}" ;;
|
||||
(jpg) local COVER="${file}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
local coverList=($(find $(dirname ${cue}) -mindepth 1 -maxdepth 1 -name '*.jpg' -o -name '*.png'))
|
||||
local COVER="${coverList}"
|
||||
import_images "${GIT_DIR}" "${SOURCE}" "${IMG}" "${CUE}" $([[ -n "${ACCURIP}" ]] && echo "-a") "${ACCURIP}" $([[ -n "${LOG}" ]] && echo "-l") "${LOG}" $([[ -n "${COVER}" ]] && echo "-c") "${COVER}" >${STDERR} 2>&1
|
||||
local EXIT=$?
|
||||
[[ ${EXIT} -eq 0 ]] && _msg OK || _msg WARN "Import_images exited with code ${EXIT}"
|
||||
|
|
|
@ -30,14 +30,14 @@ import_src() {
|
|||
echo "Processing audio files"
|
||||
case ${SOURCE} in
|
||||
FLAC)
|
||||
chk_integrity ${fileList[@]} >${STDERR} 2>&1
|
||||
med_integrity ${fileList[@]} >${STDERR} 2>&1
|
||||
[[ $? -eq 0 ]] || return 4
|
||||
gen_image "${TRACK_DIR}/flac" $(printf "%s\t" ${fileList[@]})
|
||||
local EXIT="$?"
|
||||
[[ $? -eq 0 ]] || return 3
|
||||
;;
|
||||
CUETOOLS|EAC)
|
||||
chk_integrity "${TRACK_DIR}/flac" >${STDERR} 2>&1
|
||||
med_integrity "${TRACK_DIR}/flac" >${STDERR} 2>&1
|
||||
[[ $? -eq 0 ]] || return 4
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue