1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
BEGIN { begin record cddb }
/^DISCID=/ BODY /$/ { data -element identifier $1 }
/^DTITLE=/ BODY /$/ { data -element title $1 }
/^EXTD=/ BODY /$/ { data -element ext $1 }
/^TTITLE/ /[0-9]+/ /=/ BODY /$/ { set trackstitle($1) $3 }
/^EXTT/ /[0-9]+/ /=/ BODY /$/ { set tracksext($1) $3 }
/^PLAYORDER/ {
foreach v [array names trackstitle] {
begin element track
data -element title $trackstitle($v)
if {[info exists tracksext($v)]} {
set d $tracksext($v)
if {[string length $d]} {
data -element ext $tracksext($v)
}
}
end element
}
}
|