forked from hummypkg/webif
0f1bbed6b9
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1789 2a923420-c742-0410-a762-8d5b09965624
46 lines
826 B
Plaintext
Executable File
46 lines
826 B
Plaintext
Executable File
#!/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]
|
|
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 "
|
|
<span id=url style=\"display: none\">$url</span>
|
|
<span id=duration style=\"display: none\">[$ts duration 1]</span>
|
|
"
|
|
|
|
jscss {vlc.js play.js} vlc.css
|
|
puts {
|
|
<fieldset class=cleft style="margin: 0 1em 1em 1em">
|
|
<legend>VLC Player</legend>
|
|
}
|
|
puts "<span class=also>Now playing: $rfile, [$ts duration] minutes.</span>"
|
|
puts {
|
|
<div id=vlc></div>
|
|
|
|
<div class=also id=info style="float: right">
|
|
</div>
|
|
|
|
</fieldset>
|
|
}
|
|
|