prevent script from stumbling when id3v2 tags are duplicated

This commit is contained in:
2021-02-06 23:43:52 +01:00
parent 04a30bc599
commit 7fa366d83d

View File

@@ -101,7 +101,7 @@ function read_tag_id3 {
error "Unknown tag \"$tag\" requested for file \"$file\""
return
fi
local line=$(grep -E "^$rfc822tag:\s" <<<"$id3v2_content_rfc822")
local line=$(grep -E "^$rfc822tag:\s" <<<"$id3v2_content_rfc822" | head -1)
local result=${line:6}
if [[ -z $result ]]; then