5dccb7cbbf
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@179 2a923420-c742-0410-a762-8d5b09965624
80 lines
1.6 KiB
Plaintext
Executable File
80 lines
1.6 KiB
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
source /mod/var/mongoose/lib/epg.class
|
|
source /mod/var/mongoose/lib/spinner.class
|
|
source /mod/var/mongoose/lib/altrow
|
|
source /mod/var/mongoose/lib/cat
|
|
|
|
[spinner new {
|
|
text "Loading EPG Data..."
|
|
size "1.2em"
|
|
style "margin: 1em;"
|
|
}] start
|
|
|
|
#cat /mod/var/mongoose/lib/epg_popup
|
|
source /mod/var/mongoose/lib/epg_popup
|
|
|
|
set start [clock milliseconds]
|
|
set records [epg fetch dump -time [clock seconds]]
|
|
set got [clock milliseconds]
|
|
|
|
set favlist [epg favlist]
|
|
|
|
puts {
|
|
<table class=borders>
|
|
<tr>
|
|
<th colspan=3>Channel</th>
|
|
<th>On Now</th>
|
|
<th>On Next</th>
|
|
</tr>
|
|
}
|
|
|
|
proc rsort {v1 v2} {
|
|
set v1s [$v1 get channel_num]
|
|
set v2s [$v2 get channel_num]
|
|
|
|
if {$v1s == $v2s} { return 0 }
|
|
if {$v1s > $v2s } { return 1 }
|
|
return -1
|
|
}
|
|
|
|
foreach record $records {
|
|
$record get_channel_info
|
|
}
|
|
|
|
foreach record [lsort -command rsort $records] {
|
|
if {$favlist != "" && [$record get service_id] ni $favlist} {
|
|
continue
|
|
}
|
|
altrow
|
|
set num [$record get channel_num]
|
|
puts "<td>$num</td>"
|
|
puts "<td>[$record channel_icon 50]</td>
|
|
<td>
|
|
<a href=/cgi-bin/epg_service.jim?service=[$record get service_id]>
|
|
[$record get channel_name]
|
|
</a></td>"
|
|
catch {
|
|
puts [$record cell]
|
|
puts [[$record next] cell]
|
|
}
|
|
puts "</tr>"
|
|
}
|
|
puts "</table>"
|
|
|
|
puts "
|
|
<a href=/cgi-bin/settings.jim>
|
|
<img border=0 height=14 src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
|
Visit settings to change EPG options.
|
|
</a><br>
|
|
"
|
|
|
|
set end [clock milliseconds]
|
|
puts "<font class=footnote>
|
|
Retrieved in: [expr [expr $got - $start] / 1000.0] seconds.
|
|
Rendered in: [expr [expr $end - $start] / 1000.0] seconds.
|
|
</font>"
|
|
|
|
epg cleanup
|
|
|