29 lines
601 B
Bash
Executable File
29 lines
601 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
# tag album(s)
|
|
|
|
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
|
|
|
function _tag_audio_extra_tags() {
|
|
bpmdetect --console --save --min 40 --max 220 --limit ${dir}/*
|
|
rg-dir ${dir}
|
|
}
|
|
|
|
for dir in ${@}; do
|
|
[[ -d ${dir} ]] || continue
|
|
if [[ "${dir}" == "singles" ]] || [[ "${dir}" == "misc" ]]; then
|
|
print -Pu2 "%B%F{yellow}skipping ${dir}%f%b"
|
|
continue
|
|
fi
|
|
|
|
picard ${dir}
|
|
mksmol ${dir}
|
|
|
|
if [[ ${dir} == ${@[-1]} ]]; then
|
|
_tag_audio_extra_tags
|
|
else
|
|
_tag_audio_extra_tags &
|
|
fi
|
|
done
|
|
|
|
unfunction _tag_audio_extra_tags
|