webif/var/mongoose/cgi-bin/browse/new.jim
hummypkg 050cb611bf working on package system
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@209 2a923420-c742-0410-a762-8d5b09965624
2011-06-28 00:20:31 +00:00

26 lines
378 B
Plaintext
Executable File

#!/mod/bin/jimsh
package require cgi
puts "Content-Type: application/json"
puts ""
cgi_input
#cgi_dump
set _cgi(dir) "/media/My Video"
set dir [dict get $_cgi dir]
# Strip double slashes
regsub -all -- {\/+} "$dir/*" "/" dir
puts "{"
foreach subdir [glob -nocomplain "$dir"] {
set new 0
foreach hmt [glob -nocomplain "$subdir/*.hmt"] {
puts "HMT: $hmt"
}
}
puts "}"