update inc new CFW versions + initial conflict detection
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2735 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
8fd5cdb062
commit
32774754a4
@ -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)
|
||||
|
@ -23,6 +23,19 @@ if {[[settings] chanchangenc]} {
|
||||
puts { <script type=text/javascript src=/js/chanchange.js></script> }
|
||||
}
|
||||
|
||||
$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 {
|
||||
<div class=warningbox style="width: 100%; margin: 0.2em"><div>
|
||||
This event conflicts with items in your scheduled recording list.
|
||||
</div></div>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
puts "
|
||||
<table class=keyval>
|
||||
<tr>
|
||||
|
@ -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;
|
||||
|
||||
|
@ -585,3 +585,12 @@ img.rollimg
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.versions
|
||||
{
|
||||
color: #ff4000 !important;
|
||||
background: transparent;
|
||||
font-size: 0.9em;
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
$(function() {
|
||||
|
||||
$('#browse').button().click(function() {
|
||||
window.location = '/browse/index.jim?dir=' +
|
||||
window.location = '/go/browse?dir=' +
|
||||
encodeURIComponent($('#dir').text());
|
||||
});
|
||||
|
||||
|
@ -112,8 +112,14 @@ puts {
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>System Information</legend>
|
||||
}
|
||||
|
||||
source /mod/webif/include/modversion.jim
|
||||
|
||||
puts "</fieldset>"
|
||||
|
||||
######################################################################
|
||||
# Second column
|
||||
puts "</div><div class=left>"
|
||||
|
@ -26,3 +26,9 @@ span.label
|
||||
color: #ff4000;
|
||||
}
|
||||
|
||||
.versions
|
||||
{
|
||||
float: none;
|
||||
clear: none;
|
||||
}
|
||||
|
||||
|
@ -9,13 +9,15 @@ if {$modbuild > 0} {
|
||||
append modver " (build $modbuild)"
|
||||
}
|
||||
|
||||
puts "<span class=blood style=\"font-size: 0.9em; float: right; clear: right\">
|
||||
puts "<span class=versions>
|
||||
Web interface version: [system pkgver webif]<br>
|
||||
Custom firmware version: $modver
|
||||
"
|
||||
catch {set fhtcpversion [system fhtcpversion]}
|
||||
catch {set kernelver [system kernelver]}
|
||||
puts "<br>Humax Version: $fhtcpversion (kernel $kernelver)"
|
||||
puts "<br>Loader Version: [system loaderver]"
|
||||
puts "<br>System ID: [system systemid]"
|
||||
puts "<br>Serial Number: [system serialno]"
|
||||
puts "<br>Last Boot Reason: [system lastbootreason]"
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user