convert ID3v1 genre numbers to text
This commit is contained in:
parent
2d0ebd6918
commit
0efce9cf18
9
atom
9
atom
@ -38,6 +38,8 @@ declare -r \
|
|||||||
\
|
\
|
||||||
oldIFS="$IFS"
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
source $SHAREDIR/id3genres
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
#parse arguments
|
#parse arguments
|
||||||
@ -704,7 +706,7 @@ gettag() {
|
|||||||
| sed -n "/^${1}=/I{s/^${1}=//I;p}"
|
| sed -n "/^${1}=/I{s/^${1}=//I;p}"
|
||||||
}
|
}
|
||||||
|
|
||||||
getInfosMP3_version='ID3-0.1'
|
getInfosMP3_version='ID3-0.2'
|
||||||
tagreaders+=( "$getInfosMP3_version" )
|
tagreaders+=( "$getInfosMP3_version" )
|
||||||
getInfos::MP3() {
|
getInfos::MP3() {
|
||||||
tagreader="$getInfosMP3_version"
|
tagreader="$getInfosMP3_version"
|
||||||
@ -717,6 +719,11 @@ getInfos::MP3() {
|
|||||||
title=$(gettag title)
|
title=$(gettag title)
|
||||||
tracknum=$(gettag tracknumber)
|
tracknum=$(gettag tracknumber)
|
||||||
year=$(gettag year)
|
year=$(gettag year)
|
||||||
|
expr='^[0-9]*$'
|
||||||
|
if [[ $genre =~ $expr ]]
|
||||||
|
then
|
||||||
|
genre="${id3genres[$genre]}"
|
||||||
|
fi
|
||||||
getRateChannelSoxi
|
getRateChannelSoxi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
135
share/id3genres
Normal file
135
share/id3genres
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
# Official ID3v1 Genres [0-79]
|
||||||
|
id3genres=(
|
||||||
|
Blues
|
||||||
|
'Classic Rock'
|
||||||
|
Country
|
||||||
|
Dance
|
||||||
|
Disco
|
||||||
|
Funk
|
||||||
|
Grunge
|
||||||
|
Hip-Hop
|
||||||
|
Jazz
|
||||||
|
Metal
|
||||||
|
'New Age'
|
||||||
|
Oldies
|
||||||
|
Other
|
||||||
|
Pop
|
||||||
|
"R'n'B"
|
||||||
|
Rap
|
||||||
|
Reggae
|
||||||
|
Rock
|
||||||
|
Techno
|
||||||
|
Industrial
|
||||||
|
Alternative
|
||||||
|
Ska
|
||||||
|
'Death Metal'
|
||||||
|
Pranks
|
||||||
|
'Film Score'
|
||||||
|
Euro-Techno
|
||||||
|
Ambient
|
||||||
|
Trip-Hop
|
||||||
|
Vocal
|
||||||
|
Jazz-Funk
|
||||||
|
Fusion
|
||||||
|
Trance
|
||||||
|
Classical
|
||||||
|
Instrumental
|
||||||
|
Acid
|
||||||
|
House
|
||||||
|
Game
|
||||||
|
'Sound Clip'
|
||||||
|
Gospel
|
||||||
|
Noise
|
||||||
|
AlternRock
|
||||||
|
Bass
|
||||||
|
Soul
|
||||||
|
Punk
|
||||||
|
Space
|
||||||
|
Meditative
|
||||||
|
'Instrumental Pop'
|
||||||
|
'Instrumental Rock'
|
||||||
|
Ethnic
|
||||||
|
Gothic
|
||||||
|
Darkwave
|
||||||
|
Techno-Industrial
|
||||||
|
Electronic
|
||||||
|
Pop-Folk
|
||||||
|
Eurodance
|
||||||
|
Dream
|
||||||
|
'Southern Rock'
|
||||||
|
Comedy
|
||||||
|
Cult
|
||||||
|
Gangsta
|
||||||
|
'Top 40'
|
||||||
|
'Christian Rap'
|
||||||
|
'Pop/Funk'
|
||||||
|
Jungle
|
||||||
|
'Native American'
|
||||||
|
Cabaret
|
||||||
|
'New Wave'
|
||||||
|
Psychedelic
|
||||||
|
Rave
|
||||||
|
Showtunes
|
||||||
|
Trailer
|
||||||
|
Lo-Fi
|
||||||
|
Tribal
|
||||||
|
'Acid Punk'
|
||||||
|
'Acid Jazz'
|
||||||
|
Polka
|
||||||
|
Retro
|
||||||
|
Musical
|
||||||
|
'Rock & Roll'
|
||||||
|
'Hard Rock'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Winamp's "Extended" genre list [80-125]
|
||||||
|
id3genres+=(
|
||||||
|
Folk
|
||||||
|
Folk-Rock
|
||||||
|
'National Folk'
|
||||||
|
Swing
|
||||||
|
'Fast Fusion'
|
||||||
|
Bebob
|
||||||
|
Latin
|
||||||
|
Revival
|
||||||
|
Celtic
|
||||||
|
Bluegrass
|
||||||
|
Avantgarde
|
||||||
|
'Gothic Rock'
|
||||||
|
'Progressive Rock'
|
||||||
|
'Psychedelic Rock'
|
||||||
|
'Symphonic Rock'
|
||||||
|
'Slow Rock'
|
||||||
|
'Big Band'
|
||||||
|
Chorus
|
||||||
|
'Easy Listening'
|
||||||
|
Acoustic
|
||||||
|
Humour
|
||||||
|
Speech
|
||||||
|
Chanson
|
||||||
|
Opera
|
||||||
|
'Chamber Music'
|
||||||
|
Sonata
|
||||||
|
Symphony
|
||||||
|
'Booty Bass'
|
||||||
|
Primus
|
||||||
|
'Porn Groove'
|
||||||
|
Satire
|
||||||
|
'Slow Jam'
|
||||||
|
Club
|
||||||
|
Tango
|
||||||
|
Samba
|
||||||
|
Folklore
|
||||||
|
Ballad
|
||||||
|
'Power Ballad'
|
||||||
|
'Rythmic Soul'
|
||||||
|
Freestyle
|
||||||
|
Duet
|
||||||
|
'Punk Rock'
|
||||||
|
'Drum Solo'
|
||||||
|
'A Capella'
|
||||||
|
Euro-House
|
||||||
|
'Dance Hall'
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -r id3genres
|
||||||
Loading…
x
Reference in New Issue
Block a user