From f9bc9282500f7af818a82f15e5e87c2fb6f14638 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 1 Feb 2015 01:28:03 +0000 Subject: [PATCH] Jim code cleanups (for 0.76) git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2283 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 4 +- webif/cgi-bin/epg/search.jim | 6 +- webif/cgi-bin/restart.jim | 2 +- webif/cgi-bin/status.jim | 3 +- webif/cgi-bin/xepg.jim | 2 +- webif/html/browse/assets.jim | 4 +- webif/html/browse/clipboard.jim | 2 +- webif/html/browse/ffmpeg.jim | 2 +- webif/html/browse/index.jim | 2 +- webif/html/epg/service.jim | 2 +- webif/html/epg/xservice.jim | 12 +- webif/html/jim/ref.html | 3661 +++++++++--------- webif/html/lib/topbar.jim | 1 + webif/html/log/fetch.jim | 2 +- webif/html/m/lib/header.jim | 3 +- webif/html/m/services.jim | 4 +- webif/html/services/index.jim | 6 +- webif/html/settings/modules/network/save.jim | 6 +- webif/html/settings/settings.jim | 2 +- webif/include/upgrade.jim | 15 + webif/lib/bin/auto | 2 +- webif/lib/browse.class | 4 +- webif/lib/cat | 2 +- webif/lib/epg.class | 4 +- webif/lib/pkg.class | 2 +- webif/lib/rsv.class | 8 +- 26 files changed, 1928 insertions(+), 1835 deletions(-) create mode 100755 webif/include/upgrade.jim diff --git a/CONTROL/control b/CONTROL/control index ab0678a..cc8ea5d 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,10 +1,10 @@ Package: webif Priority: optional Section: web -Version: 1.2.0-6 +Version: 1.3.0 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif-channelicons(>=1.1.14),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.0),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,mongoose,recmon(>=2.0.2) +Depends: webif-channelicons(>=1.1.14),lighttpd(>=1.4.35-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.3),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,mongoose,recmon(>=2.0.2) Suggests: Description: An evolving web interface for the Humax. Tags: http://hummy.tv/forum/threads/5866/ diff --git a/webif/cgi-bin/epg/search.jim b/webif/cgi-bin/epg/search.jim index 7ad5baa..f2f6b39 100755 --- a/webif/cgi-bin/epg/search.jim +++ b/webif/cgi-bin/epg/search.jim @@ -105,7 +105,11 @@ foreach record [lsort -command rsort $records] { set ended [$record ended] - if $ended { puts "" } else { puts ""} + if {$ended} { + puts "" + } else { + puts "" + } puts " [clock format [$record get start] -format "%a %d %b %Y"]
[clock format [$record get start] -format "%H:%M %Z"]" diff --git a/webif/cgi-bin/restart.jim b/webif/cgi-bin/restart.jim index 0295d46..f3ff590 100755 --- a/webif/cgi-bin/restart.jim +++ b/webif/cgi-bin/restart.jim @@ -45,7 +45,7 @@ puts { $(document).ready(function() { $('#progressbar').reportprogress(0); - handle = setInterval("update()", 400); + handle = setInterval("update()" , 400); $.get('/cgi-bin/restart.jim?now=yes'); }); diff --git a/webif/cgi-bin/status.jim b/webif/cgi-bin/status.jim index d5c7cff..ec47f7f 100755 --- a/webif/cgi-bin/status.jim +++ b/webif/cgi-bin/status.jim @@ -83,7 +83,7 @@ set rec 0 set output {} set opfile "" -if {[file exists "/mod/tmp/webif_auto/.op"} { +if {[file exists "/mod/tmp/webif_auto/.op"]} { set fp [open "/mod/tmp/webif_auto/.op"] lassign [split [string trim [$fp read]] ":"] op opfile $fp close @@ -284,6 +284,7 @@ foreach event $events { " [clock format [$event get nsttime] -format {%H:%M}]" \ " \n" \ "\n" \ + ] } else { lappend output [concat \ "Will record '[$event name]' " \ diff --git a/webif/cgi-bin/xepg.jim b/webif/cgi-bin/xepg.jim index cc19515..7fc4ad9 100755 --- a/webif/cgi-bin/xepg.jim +++ b/webif/cgi-bin/xepg.jim @@ -96,7 +96,7 @@ puts "
" but "<< -1 Week" $($stt - 3600 * 24 * 7) \ $($stt - $now + 3600 >= 3600 * 24 * 7) but "<< -1 Day" $($stt - 3600 * 24) $($stt - $now >= 3600 * 23) -but "<< Earlier", $($stt - 3600 * 4) $($stt > $now) +but "<< Earlier" $($stt - 3600 * 4) $($stt > $now) #but "< Now >" $now $($current == 0) but "< Now >" $now but ">> Later" $ett; diff --git a/webif/html/browse/assets.jim b/webif/html/browse/assets.jim index 25ac330..f8226cb 100755 --- a/webif/html/browse/assets.jim +++ b/webif/html/browse/assets.jim @@ -31,7 +31,7 @@ puts {
  • View Thumbnail
  • } puts {
  • Bookmarks
  • } -if $nicesplice { +if {$nicesplice} { puts {
  • Crop
  • Split (45m parts)
  • @@ -96,7 +96,7 @@ if {$model eq "HDR"} { } } -if $flatten { +if {$flatten} { puts {
  • No-Flatten
  • } } diff --git a/webif/html/browse/clipboard.jim b/webif/html/browse/clipboard.jim index 3f79218..5c6f9ac 100755 --- a/webif/html/browse/clipboard.jim +++ b/webif/html/browse/clipboard.jim @@ -16,7 +16,7 @@ switch $action { list { if {![$cb size]} { puts "Clipboard is empty" - break + exit } puts "
    " foreach file [$cb get items] { diff --git a/webif/html/browse/ffmpeg.jim b/webif/html/browse/ffmpeg.jim index 4b2357d..0d59f2d 100755 --- a/webif/html/browse/ffmpeg.jim +++ b/webif/html/browse/ffmpeg.jim @@ -5,7 +5,7 @@ source /mod/webif/lib/setup httpheader -if [file exists /mod/bin/ffmpeg] { +if {[file exists /mod/bin/ffmpeg]} { set file [cgi_get file] puts [exec /mod/webif/lib/bin/ffmpeg -i $file] } else { diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index e66eddd..1086cee 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -281,7 +281,7 @@ set stub "" foreach part [split $dir /] { if {$stub eq "/"} { set name $part } else { set name "/$part" } append stub $name - puts "$name + puts "$name" } puts "" puts "" diff --git a/webif/html/epg/service.jim b/webif/html/epg/service.jim index 4fc6e5d..dd2ec82 100755 --- a/webif/html/epg/service.jim +++ b/webif/html/epg/service.jim @@ -227,7 +227,7 @@ foreach e $records { } puts " - $hour:00 + ${hour}:00 " set currhour $hour diff --git a/webif/html/epg/xservice.jim b/webif/html/epg/xservice.jim index 65f211b..1d15c75 100755 --- a/webif/html/epg/xservice.jim +++ b/webif/html/epg/xservice.jim @@ -66,9 +66,17 @@ foreach record $records { if {[$record showing]} { puts "" } else { puts "" } - if $ended { puts "" } else { puts "" } + if {$ended} { + puts "" + } else { + puts "" + } puts "[clock format [$record get start] -format "%a %d %b %Y"]" - if $ended { puts "" } else { puts "" } + if {$ended} { + puts "" + } else { + puts "" + } puts "[clock format [$record get start] -format "%H:%M"]" puts [$record cell] puts "[$record get text]" diff --git a/webif/html/jim/ref.html b/webif/html/jim/ref.html index d2483cb..9bb32cd 100644 --- a/webif/html/jim/ref.html +++ b/webif/html/jim/ref.html @@ -3,7 +3,7 @@ - + Jim Tcl(n)