From 7fa366d83d4e9c76dbe73dc1930493d84a513b9f Mon Sep 17 00:00:00 2001 From: fabs Date: Sat, 6 Feb 2021 23:43:52 +0100 Subject: [PATCH] prevent script from stumbling when id3v2 tags are duplicated --- music_tagmove_lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music_tagmove_lib b/music_tagmove_lib index cd09924..99305bb 100644 --- a/music_tagmove_lib +++ b/music_tagmove_lib @@ -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