Name : Fix music directory extensions.

This commit is contained in:
Dmitry Voronin 2024-01-22 12:25:17 +03:00
parent a80f40882b
commit ba1a9aca36

View file

@ -215,7 +215,12 @@ function name_music() {
process() {
# Extract new name.
local ext=${target##*.}
if [[ -d "${target}" ]]; then
local new_name="$(parse_titlecase $(parse_simplify ${target%.*}))"
else
local new_name="$(parse_titlecase $(parse_simplify ${target%.*})).${ext}"
fi
# Skip on no change.
[[ "${target%/}" = "${new_name}" ]] && return 0