From df8d655cc8051ba0a81730a3af6f34907708456e Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 11 Mar 2012 00:26:14 +0000 Subject: [PATCH] improvements git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@835 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/browse/decrypt/execute.jim | 11 +++++++++++ var/mongoose/cgi-bin/restart.jim | 2 +- var/mongoose/html/diag/diag.jim | 6 ++++++ var/mongoose/html/diag/script.js | 10 ++++++++++ var/mongoose/html/lib/header.jim | 1 + var/mongoose/html/lib/header.shtml | 1 + var/mongoose/lib/pkg.class | 2 +- 7 files changed, 31 insertions(+), 2 deletions(-) diff --git a/var/mongoose/cgi-bin/browse/decrypt/execute.jim b/var/mongoose/cgi-bin/browse/decrypt/execute.jim index a458f5b..1d33d86 100755 --- a/var/mongoose/cgi-bin/browse/decrypt/execute.jim +++ b/var/mongoose/cgi-bin/browse/decrypt/execute.jim @@ -16,6 +16,12 @@ set dir [file dirname $rfile] set len [$ts duration 1] lassign [$ts dlnaloc] url +if {$url eq ""} { + puts "This file has not been indexed by the media server. + Cannot decrypt." + exit +} + set xstart [clock milliseconds] set base [file rootname $rfile] @@ -25,6 +31,11 @@ if {![file exists $origdir]} { file mkdir $origdir } set shname [file tail $base] puts "Processing $shname" +if {[file exists "$origdir/$shname.ts"]} { + puts "The file already exists in _original, cannot decrypt." + exit +} + exec wget -O "$rfile.decrypting" $url puts "Moving recording to $origdir" diff --git a/var/mongoose/cgi-bin/restart.jim b/var/mongoose/cgi-bin/restart.jim index eabda67..355ba4e 100755 --- a/var/mongoose/cgi-bin/restart.jim +++ b/var/mongoose/cgi-bin/restart.jim @@ -49,7 +49,7 @@ puts { $(document).ready(function() { $('#progressbar').reportprogress(0); - handle = setInterval("update()", 300); + handle = setInterval("update()", 350); $.get('/cgi-bin/restart.jim?now=yes'); }); diff --git a/var/mongoose/html/diag/diag.jim b/var/mongoose/html/diag/diag.jim index 269ee94..31c0b83 100755 --- a/var/mongoose/html/diag/diag.jim +++ b/var/mongoose/html/diag/diag.jim @@ -41,6 +41,12 @@ puts { + + + + + +