fix utf-8 tags
This commit is contained in:
12
encode_all
12
encode_all
@@ -144,10 +144,18 @@ function encode() {
|
||||
'--tracknumber' "${tags['TRACKNUMBER']}"
|
||||
'--date' "${album_date}")
|
||||
[[ -n "${tags[DISK]}" ]] && tag_flags+=('--comment' "DISK=${tags['DISK']}")
|
||||
tags=''
|
||||
for tag in "${tag_flags[@]}"; do
|
||||
tags+="$(printf '"%s" ' "$tag")"
|
||||
done
|
||||
if [[ "$debug_only" == 'false' ]]; then
|
||||
err="$(opusenc --quiet --discard-comments --discard-pictures "${tag_flags[@]}" "$file" "$final_opus" 2>&1)"
|
||||
# err="$(opusenc --quiet --discard-comments --discard-pictures "${tag_flags[@]}" "$file" "$final_opus" 2>&1)"
|
||||
cmd=$(printf 'opusenc --quiet --discard-comments --discard-pictures %s "%s" "%s"\n' "$tags" "$file" "$final_opus")
|
||||
printf '%s\n' "$cmd"
|
||||
eval $cmd
|
||||
else
|
||||
echo opusenc --quiet --discard-comments --discard-pictures "${tag_flags[@]}" "$file" "$final_opus"
|
||||
cmd=$(printf 'opusenc --quiet --discard-comments --discard-pictures %s "%s" "%s"\n' "$tags" "$file" "$final_opus")
|
||||
printf '%s\n' "$cmd"
|
||||
fi
|
||||
if [[ -n "$err" ]]; then
|
||||
printf '%s\n' "$err" >> "$log"
|
||||
|
Reference in New Issue
Block a user