fix mux display

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1741 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-12-11 00:16:01 +00:00
parent fe7de23c67
commit 26981ebb2d
3 changed files with 22 additions and 9 deletions

View File

@ -1,9 +1,9 @@
Package: webif Package: webif
Priority: optional Priority: optional
Section: web Section: web
Version: 1.0.7-10 Version: 1.0.7-11
Architecture: mipsel Architecture: mipsel
Maintainer: af123@hummypkg.org.uk Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.6),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6) Depends: webif-channelicons(>=1.1.7),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
Suggests: Suggests:
Description: An evolving web interface for the Humax. Description: An evolving web interface for the Humax.

View File

@ -29,20 +29,23 @@ puts "
<th>Signal Quality</th> <th>Signal Quality</th>
<th>Network</th> <th>Network</th>
<th>Mux</th> <th>Mux</th>
<th>Type</th>
<th>Channels</th> <th>Channels</th>
<th>&gt;799</th> <th>&gt;799</th>
</tr> </tr>
" "
foreach tw [$db query { foreach tw [$db query {
select tsIdx, szNetName, usTsID, ulFrequency, ucLevel, ucQuality select tsIdx, szNetName, usTsID, ulFrequency, ucLevel,
ucQuality, eTransMode
from TBL_TS join TBL_NET using (netIdx) from TBL_TS join TBL_NET using (netIdx)
order by ulFrequency order by ulFrequency
}] { }] {
lassign $tw \ lassign $tw \
x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality \
x eTransMode
altrow
puts " puts "
<tr class=odd>
<td>[f2c $ulFrequency]</td> <td>[f2c $ulFrequency]</td>
<td>[expr $ulFrequency / 1000.0] MHz</td> <td>[expr $ulFrequency / 1000.0] MHz</td>
" "
@ -64,18 +67,23 @@ foreach tw [$db query {
set name [string range $name 1 end] set name [string range $name 1 end]
if {$lcn >= 800} { incr ehs } if {$lcn >= 800} { incr ehs }
switch $name { switch $name {
"BBC ONE" { set mux "PSB1/BBC A" } "BBC THREE" { set mux "PSB1/BBC A" }
"ITV1" { set mux "PSB2/D3&amp;4" } "ITV1" { set mux "PSB2/D3&amp;4" }
"ITV" { set mux "PSB2/D3&amp;4" } "ITV" { set mux "PSB2/D3&amp;4" }
"BBC ONE HD" { set mux "PSB3/BBC B (HD)" } "BBC ONE HD" { set mux "PSB3/BBC B" }
"ITV3" { set mux "COM4/SDN" } "ITV3" { set mux "COM4/SDN" }
"Dave" { set mux "COM5/ARQ A" } "Dave" { set mux "COM5/ARQ A" }
"Film4" { set mux "COM6/ARQ B" } "Film4+1" { set mux "COM6/ARQ B" }
"BBC News HD" { set mux "COM7/ARQ C" } "BBC NEWS HD" { set mux "COM7/ARQ C" }
"Movies4Men" { set mux "Local" } "Movies4Men" { set mux "Local" }
} }
} }
puts "<td>$mux</td>" puts "<td>$mux</td>"
if {$eTransMode == 2} {
puts "<td>DVB-T (SD)</td>"
} else {
puts "<td class=blood>DVB-T2 (HD)</td>"
}
puts "<td>[llength $channels] puts "<td>[llength $channels]
<a class=mchan ts=$tsIdx href=#> <a class=mchan ts=$tsIdx href=#>
@ -93,6 +101,7 @@ foreach tw [$db query {
<th>Provider</th> <th>Provider</th>
<th>Authority</th> <th>Authority</th>
</tr>" </tr>"
altrow reset
foreach chan $channels { foreach chan $channels {
lassign $chan x lcn x name x prv x auth lassign $chan x lcn x name x prv x auth
set name [string range $name 1 end] set name [string range $name 1 end]

View File

@ -1,6 +1,10 @@
if {![exists -proc altrow]} { if {![exists -proc altrow]} {
proc altrow {{attrs ""}} {{i 0}} { proc altrow {{attrs ""}} {{i 0}} {
if {$attrs eq "reset"} {
set i 0
return
}
puts -nonewline "<tr" puts -nonewline "<tr"
if {[string first "class=" $attrs] == -1} { if {[string first "class=" $attrs] == -1} {
case $i { case $i {