diff --git a/src/cmd_import_tracks b/src/cmd_import_tracks index 2c52e9f..bc3561d 100644 --- a/src/cmd_import_tracks +++ b/src/cmd_import_tracks @@ -14,6 +14,9 @@ cmd_import_tracks() { local GIT_DIR="${1}"; shift + case ${1} in + (-b) local BATCHID=${2}; shift 2;; + esac local srcList=(${@}) local SOURCE=FLAC @@ -42,7 +45,7 @@ cmd_import_tracks() { local importList=($(find ${GIT_DIR}/.import/FLAC -mindepth 1 -maxdepth 1 -type d -printf '%p\t')) for import in ${importList[@]}; do _msg EXEC "Importing ${import}" - import_src "${GIT_DIR}" "${import}" ${FLAC} >${STDERR} 2>&1 + import_src "${GIT_DIR}" "${import}" $([[ -n "${BATCHID}" ]] && echo "-b") ${BATCHID} >${STDERR} 2>&1 local EXIT=$? [[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Importation of ${import} failed, continuing"; continue; } rm -R ${import} >/dev/null 2>&1