1
0
Fork 0

zsh: add tag_audio

This commit is contained in:
tea 2024-05-12 23:11:16 +02:00
parent 2342380888
commit b0aba545a8
No known key found for this signature in database
1 changed files with 22 additions and 0 deletions

22
.config/zsh/functions/tag_audio Executable file
View File

@ -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