don't add tag to end opus result if blank, i.e. if a tag includes =

This commit is contained in:
yosh 2022-10-26 18:10:33 -04:00
parent 88a12029e7
commit 6f1fa0db6a
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
# flacconv 1.2.1 // use https://github.com/yoshiyoshyosh/flacconv for issues
# flacconv 1.2.2 // use https://github.com/yoshiyoshyosh/flacconv for issues
set -euf
TAB="$(printf '\t')"
@ -126,7 +126,8 @@ process_file() {
opustags=""
# build opus comment chain, can't "import" tags like with flac
[ "$tagnames" ] && while read -r name; do
opustags="${opustags:+${opustags}${VTAB}}--comment${VTAB}$(metaflac --show-tag="$name" "$infile")"
tmptag="$(metaflac --show-tag="$name" "$infile")"
[ "$tmptag" ] && opustags="${opustags:+${opustags}${VTAB}}--comment${VTAB}${tmptag}"
done <<-EOF
$tagnames
EOF