"
}
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 Video_TS
} else {
set type gen
set ts 0
set img Video_Other
}
puts "
"
}
if {[dict exists $_cgi dir]} {
set dir [dict get $_cgi dir]
} else {
set dir "/media/My Video"
}
######################################################################
# Render web page
header
puts {