download already decrypted files in the clear

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@509 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-11-06 16:34:30 +00:00
parent 436db53de3
commit 9ba7c3dba8
3 changed files with 13 additions and 11 deletions

View File

@ -1,10 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 0.8.0-2
Version: 0.8.0-3
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.7),hmt(>=1.1.0),ssmtp
Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.7),hmt(>=1.1.1),ssmtp
Replaces: af123-webif
Conflicts: af123-webif
Suggests: ffmpeg,webif-iphone,nicesplice

View File

@ -80,7 +80,7 @@ proc entry {file} {{i 0}} {
# Icons
set locked 0
set encd 0
set encd 1
set odencd 0
set def unknown
set bx 0
@ -109,10 +109,9 @@ proc entry {file} {{i 0}} {
src=/images/749_1_26_Video_Encryption.png
height=21>"
}
if {[$ts flag "ODEncrypted"] > 0} {
set odencd 1
} else {
if {![$ts flag "ODEncrypted"]} {
puts "<img class=va src=/img/Decrypted.png height=21>"
set odencd 0
}
# Guidance

View File

@ -10,7 +10,7 @@ require ts.class
cgi_input
#cgi_dump
set file [cgi_get file "/media/My Video/Chuggington/Hodge_and_the_Chugnav.ts"]
set file [cgi_get file]
set rfile [file normalize $file]
set ts [ts fetch $file]
@ -18,11 +18,14 @@ set ts [ts fetch $file]
set url $file
set mime "video/ts"
# Unless the DLNA option is available.
set dlna [$ts dlnaloc]
if {[llength $dlna]} { lassign $dlna url mime }
# If it's encrypted on disk and the DLNA option is available, then use
# the server to perform decryption on the fly.
if {[$ts flag "ODEncrypted"] > 0} {
set dlna [$ts dlnaloc]
if {[llength $dlna]} { lassign $dlna url mime }
puts "DLNA: $dlna"
#puts "DLNA: $dlna"
}
puts "Content-Type: text/plain"
puts "Refresh: 0; url=$url"