[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
|
for file in ${fileList}; do
|
||||||
_msg EXEC "Consolidating ${file}"
|
_msg EXEC "Consolidating ${file}"
|
||||||
import_track "${GIT_DIR}" "${file}"
|
import_track "${GIT_DIR}" "${file}" >${STDERR} 2>&1
|
||||||
local EXIT=$?
|
local EXIT=$?
|
||||||
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Consolidation of ${file} failed, continuing"; continue; }
|
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Consolidation of ${file} failed, continuing"; continue; }
|
||||||
done
|
done
|
||||||
|
@ -36,9 +36,11 @@ cmd_import_tracks() {
|
||||||
local importList=($(find ${GIT_DIR}/.import/ -maxdepth 1 -type d -print '%p\t'))
|
local importList=($(find ${GIT_DIR}/.import/ -maxdepth 1 -type d -print '%p\t'))
|
||||||
for import in ${importList[@]}; do
|
for import in ${importList[@]}; do
|
||||||
_msg EXEC "Importing ${import}"
|
_msg EXEC "Importing ${import}"
|
||||||
import_dir "${GIT_DIR}" "${import}"
|
import_dir "${GIT_DIR}" "${import}" >${STDERR} 2>&1
|
||||||
local EXIT=$?
|
local EXIT=$?
|
||||||
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Importation of ${import} failed, continuing"; continue; }
|
[[ ${EXIT} -eq 0 ]] && _msg OK || { _msg WARN "Importation of ${import} failed, continuing"; continue; }
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,19 @@ import_dir() {
|
||||||
done
|
done
|
||||||
|
|
||||||
# Generate cuesheet
|
# Generate cuesheet
|
||||||
|
_msg EXEC "Generating cue file"
|
||||||
gen_cue "${TRACK_DIR}" $(printf '%s\t' ${metadata_trackList[@]}) > "${GIT_DIR}/${IMAGEID}.cue"
|
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
|
# Generate tags file
|
||||||
|
_msg EXEC "Generating tags file"
|
||||||
gen_mtag $(printf '%s\t' ${metadata_trackList[@]}) > "${GIT_DIR}/${IMAGEID}.tags"
|
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