[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
|
for cue in ${cueList[@]}; do
|
||||||
_msg EXEC "Consolidating ${cue}"
|
_msg EXEC "Consolidating ${cue}"
|
||||||
for var in IMG CUE ACCURIP LOG COVER; do unset ${var}; done
|
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})
|
local file=$(sed "s|cue|${ext}|" <<< ${cue})
|
||||||
[[ ! -f "${file}" ]] && continue
|
[[ ! -f "${file}" ]] && continue
|
||||||
case ${ext} in
|
case ${ext} in
|
||||||
|
@ -42,9 +42,11 @@ cmd_import_images() {
|
||||||
|
|
||||||
(accurip) local ACCURIP="${file}" ;;
|
(accurip) local ACCURIP="${file}" ;;
|
||||||
(log) local LOG="${file}" ;;
|
(log) local LOG="${file}" ;;
|
||||||
(jpg) local COVER="${file}" ;;
|
|
||||||
esac
|
esac
|
||||||
done
|
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
|
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=$?
|
local EXIT=$?
|
||||||
[[ ${EXIT} -eq 0 ]] && _msg OK || _msg WARN "Import_images exited with code ${EXIT}"
|
[[ ${EXIT} -eq 0 ]] && _msg OK || _msg WARN "Import_images exited with code ${EXIT}"
|
||||||
|
|
|
@ -30,14 +30,14 @@ import_src() {
|
||||||
echo "Processing audio files"
|
echo "Processing audio files"
|
||||||
case ${SOURCE} in
|
case ${SOURCE} in
|
||||||
FLAC)
|
FLAC)
|
||||||
chk_integrity ${fileList[@]} >${STDERR} 2>&1
|
med_integrity ${fileList[@]} >${STDERR} 2>&1
|
||||||
[[ $? -eq 0 ]] || return 4
|
[[ $? -eq 0 ]] || return 4
|
||||||
gen_image "${TRACK_DIR}/flac" $(printf "%s\t" ${fileList[@]})
|
gen_image "${TRACK_DIR}/flac" $(printf "%s\t" ${fileList[@]})
|
||||||
local EXIT="$?"
|
local EXIT="$?"
|
||||||
[[ $? -eq 0 ]] || return 3
|
[[ $? -eq 0 ]] || return 3
|
||||||
;;
|
;;
|
||||||
CUETOOLS|EAC)
|
CUETOOLS|EAC)
|
||||||
chk_integrity "${TRACK_DIR}/flac" >${STDERR} 2>&1
|
med_integrity "${TRACK_DIR}/flac" >${STDERR} 2>&1
|
||||||
[[ $? -eq 0 ]] || return 4
|
[[ $? -eq 0 ]] || return 4
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue