[print_meta_mtag] Fixed bug where sometimes first tag wouldn't get parsed

This commit is contained in:
ayakael 2019-02-10 12:02:47 -05:00
parent a731a3a8b7
commit 9d5e1271a4
No known key found for this signature in database
GPG key ID: DF4ED0DE242BD38A

View file

@ -22,7 +22,7 @@ print_meta_mtag() {
# If list of Tags isn't giving, assumes that we want to output all tags, and thus this # If list of Tags isn't giving, assumes that we want to output all tags, and thus this
# generates all tags present in MTAG file # generates all tags present in MTAG file
[[ -z "${tagList[@]}" ]] && local tagList=($(awk 'BEGIN{RS="[,]?\n";FS=" : "}{if($1!~"@"){print $1}}' ${FILE} | tr -d '[]{}" ' | awk '!seen[$0]++' | tail -n +3)) [[ -z "${tagList[@]}" ]] && local tagList=($(awk 'BEGIN{RS="[,]?\n";FS=" : "}{if($1!~"@"){print $1}}' ${FILE} | tr -d '[]{}" ' | awk '!seen[$0]++' | sed '/^&/d' | tail -n +2 ))
# Goes through every tag, determines it's original value, and then prints out. # Goes through every tag, determines it's original value, and then prints out.