2018-03-26 19:34:44 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-28 12:48:49 -04:00
|
|
|
# doc print_meta_flac {
|
2018-03-26 19:34:44 -04:00
|
|
|
#
|
|
|
|
# DESCRIPTION
|
2018-03-28 12:48:49 -04:00
|
|
|
# print_meta_flac - Prints metadata of remote flac in FIELD=VALUE; format.
|
2018-03-26 19:34:44 -04:00
|
|
|
#
|
|
|
|
# USAGE
|
2018-03-28 12:48:49 -04:00
|
|
|
# print_meta_flac </path/to/flac>
|
2018-03-26 19:34:44 -04:00
|
|
|
#
|
|
|
|
# }
|
|
|
|
|
2018-03-28 12:48:49 -04:00
|
|
|
print_meta_flac() {
|
2018-03-28 09:52:57 -04:00
|
|
|
local FILE="${1}"
|
|
|
|
|
|
|
|
if [[ -f ${FILE} ]]; then
|
2018-03-28 11:07:17 -04:00
|
|
|
awk 'BEGIN{FS=": ";ORS=";"}{if($1 ~ /comment\[/){print $2}}' <<< $(metaflac --list --block-type=VORBIS_COMMENT "${FILE}") | sed 's|.$||'
|
2018-03-28 09:52:57 -04:00
|
|
|
fi
|
|
|
|
}
|