diff --git a/.config/zsh/functions/tag_audio b/.config/zsh/functions/tag_audio new file mode 100755 index 0000000..3af679f --- /dev/null +++ b/.config/zsh/functions/tag_audio @@ -0,0 +1,22 @@ +#!/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 + picard ${dir} + mksmol ${dir} + + if [[ ${dir} == ${@[-1]} ]]; then + _tag_audio_extra_tags + else + _tag_audio_extra_tags & + fi +done + +unfunction _tag_audio_extra_tags