#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/pretty_size puts "Content-Type: text/html" puts "" cgi_input #cgi_dump #set _cgi(file) "/media/My Video/Dangermouse/Series 1/01_rogue_robots.avi" if {![dict exists $_cgi file]} { exit } set file [dict get $_cgi file] set type [dict get $_cgi type] file stat $file st set sz [pretty_size $st(size)] if {$type eq "ts"} { source /mod/var/mongoose/lib/epg.class source /mod/var/mongoose/lib/ts.class set ts [ts fetch $file] puts " " if {[$ts flag "Guidance"] > 0} { puts " " } puts " " set dlna [$ts dlnaloc] lassign $dlna url if {[llength $dlna]} { puts "" } puts " " puts "
Title [$ts get title]
Synopsis [$ts get synopsis]
Guidance [$ts get guidance]
Definition " if {[$ts get definition] eq "HD"} { puts "" } else { puts "" } puts "
Channel [epg channelicon [$ts get channel_name] 50 "vertical-align: middle"] [$ts get channel_num] - [$ts get channel_name]
Start Time " puts [clock format [$ts get start] -format "%c %Z"] puts "
End Time " puts [clock format [$ts get end] -format "%c %Z"] puts "
Duration [$ts duration] minute(s).
Size $sz
DLNA URL $url
Flags [$ts get flags] " if {[$ts get bookmarks]} { puts " \[Bookmarks: [$ts get bookmarks]\]" } puts "
" exit } # Otherwise, for a general file. puts "
File $file
Size $sz
Info Loading...
" set url "/cgi-bin/browse/ffmpeg.jim?file=[cgi_quote_url $file]" puts { }