fix tag parsing (Ogg, FLAC)

This commit is contained in:
Vincent Riquer 2013-03-08 12:53:29 +01:00
parent a66528ac89
commit eb884e0e80

13
atom
View File

@ -650,12 +650,8 @@ getRateChannelMPC() {
} }
gettag() { gettag() {
tagval=$(
echo -e "$infos" \ echo -e "$infos" \
| egrep -i "^${1}=" | sed -n "/^${1}=/I{s/^${1}=//I;p}"
)
echo "${tagval#${1^^}=}"
unset tagval
} }
getInfos::MP3() { getInfos::MP3() {
@ -681,7 +677,7 @@ getInfos::MP3() {
getInfos::Ogg() { getInfos::Ogg() {
infos=$( infos=$(
ogginfo "$sourcepath/$filename" \ ogginfo "$sourcepath/$filename" \
sed 's/\t//' | sed 's/\t//'
) )
albumartist=$(gettag albumartist) albumartist=$(gettag albumartist)
album=$(gettag album) album=$(gettag album)
@ -740,6 +736,11 @@ getInfos::FLAC() {
title=$(gettag title) title=$(gettag title)
tracknum="$(gettag tracknumber)/$(gettag tracktotal)" tracknum="$(gettag tracknumber)/$(gettag tracktotal)"
year=$(gettag date) year=$(gettag date)
if [ -n "$tracknum" -a -n "$tracktotal" ]
then
tracknum="$tracknum/$tracktotal"
fi
year=$(gettag DATE)
{ {
read rate read rate
read channels read channels