soxi (from the SoX distribution) reads ID3v2

This commit is contained in:
Vincent Riquer 2013-03-06 22:37:54 +01:00
parent f2fe7e98c3
commit 2427330aa6

12
atom
View File

@ -638,22 +638,14 @@ gettag() {
}
getInfos::MP3() {
# mp3info only supports ID3v1. Information may be incomplete.
infos=$(
mp3info -p '
ALBUM=%l
ARTIST=%a
GENRE=%g
TITLE=%t
TRACKNUM=%n
YEAR=%y' "$sourcepath/$filename" \
| iconv -f $sourceid3charset -t utf-8//TRANSLIT
soxi -a "$sourcepath/$filename"
)
album=$(gettag album)
artist=$(gettag artist)
genre=$(gettag genre)
title=$(gettag title)
tracknum=$(gettag tracknum)
tracknum=$(gettag tracknumber)
year=$(gettag year)
[ -n "$album" \
-o -n "$artist" \