fix utf-8 tags

This commit is contained in:
2024-08-04 10:52:06 -04:00
parent 4415a89b22
commit e70dc21af5
4 changed files with 275 additions and 9 deletions

View File

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