diff --git a/CONTROL/control b/CONTROL/control index 2d6161a..961a7ca 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.2.8-8 +Version: 1.2.8-9 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: tcpfix,webif-channelicons(>=1.1.20),lighttpd(>=1.4.39-1),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.1),hmt(>=2.0.9),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7) diff --git a/webif/cgi-bin/epg/info.jim b/webif/cgi-bin/epg/info.jim index 21d8280..e40804e 100755 --- a/webif/cgi-bin/epg/info.jim +++ b/webif/cgi-bin/epg/info.jim @@ -23,6 +23,19 @@ if {[[settings] chanchangenc]} { puts { } } +$record process_sched +if {[$record get sched_type] < 1} { + set tuners [system tuners] + set conflicts [rsv conflicts [$record get start] [$record get duration]] + if {$conflicts >= $tuners} { + puts { +
+This event conflicts with items in your scheduled recording list. +
+ } + } +} + puts " diff --git a/webif/html/browse/script.js b/webif/html/browse/script.js index 5f3478d..d00e717 100755 --- a/webif/html/browse/script.js +++ b/webif/html/browse/script.js @@ -493,7 +493,7 @@ var menuclick = function(action, el, pos) break; case 'vthm': - $('#thmbmp').attr('src', 'bmp.jim?file=' + file); + $('#thmbmp').attr('src', '/browse/bmp.jim?file=' + file); $('#bmpdialogue').dialog('open'); break; diff --git a/webif/html/css/style.css b/webif/html/css/style.css index 7f7d7cd..259cddf 100644 --- a/webif/html/css/style.css +++ b/webif/html/css/style.css @@ -585,3 +585,12 @@ img.rollimg width: 140px; } +.versions +{ + color: #ff4000 !important; + background: transparent; + font-size: 0.9em; + float: right; + clear: right; +} + diff --git a/webif/html/dedup/script.js b/webif/html/dedup/script.js index ef54200..b662cf2 100755 --- a/webif/html/dedup/script.js +++ b/webif/html/dedup/script.js @@ -2,7 +2,7 @@ $(function() { $('#browse').button().click(function() { - window.location = '/browse/index.jim?dir=' + + window.location = '/go/browse?dir=' + encodeURIComponent($('#dir').text()); }); diff --git a/webif/html/diag/diag.jim b/webif/html/diag/diag.jim index 4dffb67..3c6fb14 100755 --- a/webif/html/diag/diag.jim +++ b/webif/html/diag/diag.jim @@ -112,8 +112,14 @@ puts {
+
+System Information } +source /mod/webif/include/modversion.jim + +puts "
" + ###################################################################### # Second column puts "
" diff --git a/webif/html/diag/style.css b/webif/html/diag/style.css index e112b60..bc6deb7 100644 --- a/webif/html/diag/style.css +++ b/webif/html/diag/style.css @@ -26,3 +26,9 @@ span.label color: #ff4000; } +.versions +{ + float: none; + clear: none; +} + diff --git a/webif/include/modversion.jim b/webif/include/modversion.jim index ac4d2a2..3b4ebb9 100755 --- a/webif/include/modversion.jim +++ b/webif/include/modversion.jim @@ -9,13 +9,15 @@ if {$modbuild > 0} { append modver " (build $modbuild)" } -puts " +puts " Web interface version: [system pkgver webif]
Custom firmware version: $modver " catch {set fhtcpversion [system fhtcpversion]} catch {set kernelver [system kernelver]} puts "
Humax Version: $fhtcpversion (kernel $kernelver)" +puts "
Loader Version: [system loaderver]" +puts "
System ID: [system systemid]" puts "
Serial Number: [system serialno]" puts "
Last Boot Reason: [system lastbootreason]" diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index 4cdf9c1..081d56b 100755 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -819,3 +819,31 @@ proc {rsv restore} {file} { close $fd } +# Check for scheduled events at the same time +proc {rsv conflicts} {s d} { + global rsvdb + set query " + select count(*) as num + from TBL_RESERVATION + where ersvtype <= 3 + and ( + ( + nsttime >= $s + and nsttime < $s + $d + ) or ( + nsttime + nduration > $s + and nsttime + nduration <= $s + $d + ) or ( + nsttime <= $s + and nsttime + nduration >= $s + $d + )) + " + set ret [$rsvdb query $query] + + set num 0 + if {[llength $ret] > 0} { + lassign [lindex $ret 0] x num + } + return $num +} + diff --git a/webif/lib/system.class b/webif/lib/system.class index c7f6d5d..e5bbd00 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -94,13 +94,27 @@ proc {system fhtcpversion} {} {{ver ""}} { return $ver } -# 822272+6 - MAC address -# 833536 - Serial number +# c0400 System ID +# c8c00 MAC address +# cb800 Serial Number + +proc {system systemid} {} {{id ""}} { + if {$id ne ""} { return $id } + set fd [open /dev/mtd3 r] + + $fd seek 0xc0400 + set bytes [$fd read 4] + $fd close + binary scan $bytes H* hex + set id [format "%s.%s" [string range $hex 0 3] [string range $hex 4 end]] + return $id +} + proc {system serialno} {} {{serial ""}} { if {$serial ne ""} { return $serial } set fd [open /dev/mtd3 r] - $fd seek 833536 + $fd seek 0xcb800 set bytes [$fd read 14] $fd close set serial "[string range $bytes 0 1] [string range $bytes 2 8] [ @@ -108,6 +122,26 @@ proc {system serialno} {} {{serial ""}} { return $serial } +proc {system loaderver} {} {{ver ""}} { + if {$ver ne ""} { return $ver } + set fd [open /dev/mtd3 r] + $fd seek 0x20006 + set bytes [$fd read 2] + $fd close + set ver [switch $bytes { + "\x04\x5f" { format "a7.30" } + "\xec\xe5" { format "a7.31" } + "\x59\x9d" { format "a7.33" } + "\x72\x5c" { format "a7.34" } + "\x8f\x7c" { format "L7.27" } + default { + binary scan $bytes H* hex + format "Unknown - $hex" + } + }] + return $ver +} + proc {system kernelver} {} {{ver ""}} { if {$ver ne ""} { return $ver } #1 SMP Sun Mar 25 18:30:38 KST 2012 @@ -128,7 +162,8 @@ proc {system kernelver} {} {{ver ""}} { "Feb 7 14:15:02 KST 2014" { format "HDR_1.03.12" } "May 19 22:39:27 BST 2014" { format "HDR_CFW_3.00" } "Feb 19 20:58:57 GMT 2015" { format "HDR_CFW_3.03" } - "Nov 18 19:16:42 GMT 2015" { format "HDR_CFW_3.10" } + "Mar 11 23:34:27 GMT 2016" { format "HDR_CFW_3.10" } + "Mar 11 23:37:22 GMT 2016" { format "HDR_CFW_3.10d" } # HD "Oct 11 21:14:31 KST 2010" { format "HD_1.01.12" } @@ -538,6 +573,14 @@ proc {system display} {hdr hd} { } } +proc {system tuners} {} { + if {[system model] eq "HDR"} { + return 2 + } else { + return 1 + } +} + proc {system uptime} {} { set fd [open /proc/uptime r] set uptime [lindex [split [read $fd]] 0]