#!/mod/bin/jimsh package require cgi source /mod/webif/lib/setup require ts.class pretty_size puts "Content-Type: text/html\r\n" cgi_input #cgi_dump header set rfile [cgi_get file] set ts [ts fetch $rfile] if {[catch {$ts get file}]} { puts "Invalid TS file, '$rfile'" exit } if {![$ts flag "ODEncrypted"]} { set url $rfile } else { lassign [$ts dlnaloc] url if {$url eq ""} { puts "Media is encrypted and not indexed by the DLNA Server." exit } } puts " $url [$ts duration 1] " puts {
VLC Player } puts "Now playing: $rfile, [$ts duration] minutes." puts {
}