replace_slash

This commit is contained in:
2022-01-29 18:18:12 +01:00
parent 7c33ff2dca
commit c7a7dee603

View File

@@ -273,13 +273,14 @@ function cmd_wrap {
}
function tagmove_single {
function _replace_slash { tr '/' '-' <<<"$1"; }
local_errf=
file_name="$1"
artist=$(read_tag artist "$file_name")
date=$(read_tag date "$file_name")
album=$(read_tag album "$file_name")
track=$(read_tag track "$file_name")
title=$(read_tag title "$file_name")
artist=$(_replace_slash "$(read_tag artist "$file_name")")
date=$( _replace_slash "$(read_tag date "$file_name")")
album=$( _replace_slash "$(read_tag album "$file_name")")
track=$( _replace_slash "$(read_tag track "$file_name")")
title=$( _replace_slash "$(read_tag title "$file_name")")
if [[ -n $local_errf ]]; then
error "Error reading tags for file \"$file_name\""
@@ -297,7 +298,7 @@ function tagmove_single {
# Set fixed width for track number
track=$(printf "%02d" $(cut -d'/' -f1 <<<"${track#0}"))
eval "dest_directory=\"$DIRECTORY_FORMAT\""
eval "dest_file=\"$FILE_FORMAT\""