[import_dir] [cmd_import_tracks] Finalized functions
This commit is contained in:
parent
f2b8e8f52e
commit
8bdaa1bf57
2 changed files with 15 additions and 2 deletions
|
@ -27,7 +27,7 @@ cmd_import_tracks() {
|
|||
|
||||
for file in ${fileList}; do
|
||||
_msg EXEC "Consolidating ${file}"
|
||||
import_track "${GIT_DIR}" "${file}"
|
||||
import_track "${GIT_DIR}" "${file}" >${STDERR} 2>&1
|
||||
local EXIT=$?
|
||||
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Consolidation of ${file} failed, continuing"; continue; }
|
||||
done
|
||||
|
@ -36,9 +36,11 @@ cmd_import_tracks() {
|
|||
local importList=($(find ${GIT_DIR}/.import/ -maxdepth 1 -type d -print '%p\t'))
|
||||
for import in ${importList[@]}; do
|
||||
_msg EXEC "Importing ${import}"
|
||||
import_dir "${GIT_DIR}" "${import}"
|
||||
import_dir "${GIT_DIR}" "${import}" >${STDERR} 2>&1
|
||||
local EXIT=$?
|
||||
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Importation of ${import} failed, continuing"; continue; }
|
||||
done
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -42,8 +42,19 @@ import_dir() {
|
|||
done
|
||||
|
||||
# Generate cuesheet
|
||||
_msg EXEC "Generating cue file"
|
||||
gen_cue "${TRACK_DIR}" $(printf '%s\t' ${metadata_trackList[@]}) > "${GIT_DIR}/${IMAGEID}.cue"
|
||||
local EXIT=$?
|
||||
[[ $? -eq 0 ]] && _msg OK || { _msg WARN; return 1; }
|
||||
|
||||
# Generate tags file
|
||||
_msg EXEC "Generating tags file"
|
||||
gen_mtag $(printf '%s\t' ${metadata_trackList[@]}) > "${GIT_DIR}/${IMAGEID}.tags"
|
||||
local EXIT=$?
|
||||
[[ $? -eq 0 ]] && _msg OK || { _msg WARN; return 1; }
|
||||
|
||||
|
||||
# Move joined.flac to GIT_DIR
|
||||
mv "${TARGET_DIR}/joined.flac" "${GIT_DIR}/${IMAGEID}.flac"
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue