From 9a874d65d27c9332181a898dd1a82b0844d7a8dc Mon Sep 17 00:00:00 2001 From: hummypkg Date: Tue, 28 Feb 2017 20:39:45 +0000 Subject: [PATCH] add VFD to status git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3857 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/cgi-bin/status.jim | 7 +++++++ webif/lib/bin/fixencflags | 18 +++++++++--------- webif/lib/bin/genthumb | 16 ++++++++++++++++ webif/lib/ts.class | 1 + 5 files changed, 34 insertions(+), 10 deletions(-) create mode 100755 webif/lib/bin/genthumb diff --git a/CONTROL/control b/CONTROL/control index 0c607cb..d526117 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.0-11 +Version: 1.4.0-12 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.25),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.10),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1) diff --git a/webif/cgi-bin/status.jim b/webif/cgi-bin/status.jim index 7db50f1..c3864cd 100755 --- a/webif/cgi-bin/status.jim +++ b/webif/cgi-bin/status.jim @@ -348,6 +348,13 @@ foreach event $events { } } +###################################################################### +# VFD + +if {[file exists /tmp/.vfd] && $runmode ne "cgi"} { + lappend output "VFD: [file read /tmp/.vfd]" +} + ###################################################################### # Idle Time diff --git a/webif/lib/bin/fixencflags b/webif/lib/bin/fixencflags index 812977d..ef86637 100755 --- a/webif/lib/bin/fixencflags +++ b/webif/lib/bin/fixencflags @@ -4,17 +4,17 @@ source /mod/webif/lib/setup require system.class ts.class proc fix_one {ts} { - set flag [$ts flag "ODEncrypted"] - set rfile [file rootname [$ts get file]] - set anencd [exec /mod/bin/stripts -qE $rfile] + set flag [$ts flag "ODEncrypted"] + set rfile [file rootname [$ts get file]] + set anencd [exec /mod/bin/stripts -qE $rfile] if {$flag && $anencd != "1"} { - exec /mod/bin/hmt -encrypted "$rfile.hmt" - puts "FIXED ENC $rfile" - } + exec /mod/bin/hmt -encrypted "$rfile.hmt" + puts "FIXED ENC $rfile" + } if {!$flag && $anencd == "1"} { - exec /mod/bin/hmt +encrypted "$rfile.hmt" - puts "FIXED DEC $rfile" - } + exec /mod/bin/hmt +encrypted "$rfile.hmt" + puts "FIXED DEC $rfile" + } } if {![llength $argv]} { diff --git a/webif/lib/bin/genthumb b/webif/lib/bin/genthumb new file mode 100755 index 0000000..4729d85 --- /dev/null +++ b/webif/lib/bin/genthumb @@ -0,0 +1,16 @@ +#!/mod/bin/jimsh + +source /mod/webif/lib/setup +require system.class ts.class + +proc generate {ts} { + set rfile [file rootname [$ts get file]] + if {[file exists "$rfile.thm"]} return + if {[$ts flag ODEncrypted]} return + if {[$ts flag Radio]} return + puts "Generating thumbnail for $rfile" + $ts mkthm 1 +} + +ts iterate [lambda {ts} { generate $ts }] + diff --git a/webif/lib/ts.class b/webif/lib/ts.class index c017d5f..54f4942 100644 --- a/webif/lib/ts.class +++ b/webif/lib/ts.class @@ -354,6 +354,7 @@ ts method mkbmp {{offset 0} {ext ""}} { ts method mkthm {{offset 0}} { if {![$self mkbmp $offset]} { return 0 } set bfile [file rootname $file] + # Trim the bitmap header from the start of the file if {[catch { exec /bin/dd if=$bfile.bmp of=$bfile.thm~ bs=54 skip=1 } msg]} {