dont be picky about tag type case

This commit is contained in:
Luke Tidd 2023-04-28 10:55:03 -04:00
parent 64f79ca43e
commit b8789db0ef
Signed by: luke
GPG Key ID: 75D6600BEF4E8E8F

View File

@ -92,13 +92,7 @@ find "$src_library" -type f -name '*.flac' | while read file; do
echo line: $line
tag_type="$(cut -d= -f1 <<< "$line")"
tag_val="$(cut -d= -f2- <<< "$line")"
[[ "$tag_type" == 'ReleaseDate' ]] && tag_type='DATE'
[[ "$tag_type" == 'Year' ]] && tag_type='YEAR'
[[ "$tag_type" == 'Artist' ]] && tag_type='ARTIST'
[[ "$tag_type" == 'Title' ]] && tag_type='TITLE'
[[ "$tag_type" == 'Tracknumber' ]] && tag_type='TRACKNUMBER'
[[ "$tag_type" == 'Album' ]] && tag_type='ALBUM'
tags[$tag_type]="$tag_val"
tags[$tag_type]="${tag_val^^}"
done < <(metaflac --list --block-type=VORBIS_COMMENT "$file" | grep 'comment\[' | cut -d: -f2- | sed 's/^ //')