diff --git a/CONTROL/control b/CONTROL/control index 2c35c26..bc99474 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -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 diff --git a/var/mongoose/cgi-bin/browse.jim b/var/mongoose/cgi-bin/browse.jim index 8199a6e..456893e 100755 --- a/var/mongoose/cgi-bin/browse.jim +++ b/var/mongoose/cgi-bin/browse.jim @@ -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 "" + set odencd 0 } # Guidance diff --git a/var/mongoose/cgi-bin/browse/download.jim b/var/mongoose/cgi-bin/browse/download.jim index 81a8fcf..7107939 100755 --- a/var/mongoose/cgi-bin/browse/download.jim +++ b/var/mongoose/cgi-bin/browse/download.jim @@ -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"