fix tag parsing (Ogg, FLAC)
This commit is contained in:
parent
a66528ac89
commit
eb884e0e80
15
atom
15
atom
@ -650,12 +650,8 @@ getRateChannelMPC() {
|
||||
}
|
||||
|
||||
gettag() {
|
||||
tagval=$(
|
||||
echo -e "$infos" \
|
||||
| egrep -i "^${1}="
|
||||
)
|
||||
echo "${tagval#${1^^}=}"
|
||||
unset tagval
|
||||
echo -e "$infos" \
|
||||
| sed -n "/^${1}=/I{s/^${1}=//I;p}"
|
||||
}
|
||||
|
||||
getInfos::MP3() {
|
||||
@ -681,7 +677,7 @@ getInfos::MP3() {
|
||||
getInfos::Ogg() {
|
||||
infos=$(
|
||||
ogginfo "$sourcepath/$filename" \
|
||||
sed 's/\t//'
|
||||
| sed 's/\t//'
|
||||
)
|
||||
albumartist=$(gettag albumartist)
|
||||
album=$(gettag album)
|
||||
@ -740,6 +736,11 @@ getInfos::FLAC() {
|
||||
title=$(gettag title)
|
||||
tracknum="$(gettag tracknumber)/$(gettag tracktotal)"
|
||||
year=$(gettag date)
|
||||
if [ -n "$tracknum" -a -n "$tracktotal" ]
|
||||
then
|
||||
tracknum="$tracknum/$tracktotal"
|
||||
fi
|
||||
year=$(gettag DATE)
|
||||
{
|
||||
read rate
|
||||
read channels
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user