#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
header
set rfile [cgi_get file]
set ts [ts fetch $rfile]
set dir [file dirname $rfile]
# 45 minute chunks
set max $(45 * 60)
set len [$ts duration 1]
set esttime $(int($len * 0.025))
if {[$ts get definition] eq "HD"} { set esttime $($esttime * 4) }
puts "