#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/ts.class source /mod/var/mongoose/lib/pretty_size puts "Content-Type: text/html" puts "" set ignore {.nts .thm .hmt .hmi} set include {.ts .avi .mpg .wmv .mkv} cgi_input #cgi_dump #set env(REQUEST_URI) '' #set _cgi(dir) "/media/My Video/Chuggington" proc directory {file bfile} { puts "
" } proc entry {file} {{i 0}} { set bfile [file tail $file] if {[string index $bfile 0] == "\025"} { set bfile [string range $bfile 1 end] } if [file isdirectory "$file"] { directory $file $bfile continue } set ext [file extension $file] if {$ext in $::ignore || $ext ni $::include} { continue } file stat $file st set sz [pretty_size $st(size)] set base [file rootname $file] if {$ext eq ".ts" && [file exists "${base}.nts"]} { set type ts set ts [ts fetch $file 1] set img 741_1_10_Video_Title.png set pad 0 set newpad "top: -6; left: 4;" } else { set type gen set ts 0 set img 743_4_10_Video_Xvid_File.png set pad "2" set newpad "top: -2; left: 2;" } puts "