Name : Fix music directory extensions.
This commit is contained in:
parent
a80f40882b
commit
ba1a9aca36
|
@ -215,7 +215,12 @@ function name_music() {
|
||||||
process() {
|
process() {
|
||||||
# Extract new name.
|
# Extract new name.
|
||||||
local ext=${target##*.}
|
local ext=${target##*.}
|
||||||
local new_name="$(parse_titlecase $(parse_simplify ${target%.*})).${ext}"
|
|
||||||
|
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.
|
# Skip on no change.
|
||||||
[[ "${target%/}" = "${new_name}" ]] && return 0
|
[[ "${target%/}" = "${new_name}" ]] && return 0
|
||||||
|
|
Reference in a new issue