View Single Post
Old 09-14-2005, 01:39 PM  
Harm
Too much time...
 
Join Date: Jul 2003
Posts: 1,430
Default

Hehe, it looks like I've stripped too much code from this one. Here is the complete proc ismp3.
Code:
proc ismp3 {section name multi} {
global anuke
if {$multi == 1} {set relname [lindex [split $name /] end-1]} else {set relname [lindex [split $name /] end]}
set mp3info [split [getio "$name" "mp3"] |]
if {[llength $mp3info]==0} {return 0}
set bitrate [lindex $mp3info 1]; set year [lindex $mp3info 7]
foreach rule $anuke(mp3,$section) {
        if {[string match -nocase $relname [lindex $rule 0]] && $year >= [lindex $rule 1] && $bitrate >= [lindex $rule 2]} {
                return ""
        }
}
return "enforcing.our.mp3.rules"
}
Harm is offline   Reply With Quote