2011-06-07 13:26:45 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
2011-06-29 22:53:15 +00:00
|
|
|
package require cgi
|
2011-07-01 22:56:53 +00:00
|
|
|
source /mod/var/mongoose/lib/setup
|
2011-09-14 22:38:22 +00:00
|
|
|
require epg.class spinner.class altrow epg_search totop
|
2011-06-07 13:26:45 +00:00
|
|
|
|
2011-06-08 23:33:35 +00:00
|
|
|
[spinner new {
|
2011-06-29 22:53:15 +00:00
|
|
|
text "Loading Now/Next Information..."
|
2011-06-08 23:33:35 +00:00
|
|
|
size "1.2em"
|
|
|
|
style "margin: 1em;"
|
|
|
|
}] start
|
|
|
|
|
2011-07-01 22:56:53 +00:00
|
|
|
require epg_popup
|
2011-06-08 23:33:35 +00:00
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
set start [clock milliseconds]
|
|
|
|
set records [epg fetch dump -time [clock seconds]]
|
|
|
|
set got [clock milliseconds]
|
|
|
|
|
2011-06-14 11:48:55 +00:00
|
|
|
set favlist [epg favlist]
|
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
puts {
|
|
|
|
<table class=borders>
|
|
|
|
<tr>
|
2011-06-09 21:16:30 +00:00
|
|
|
<th colspan=3>Channel</th>
|
2011-06-07 13:26:45 +00:00
|
|
|
<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
|
|
|
|
}
|
|
|
|
|
2011-06-14 11:48:55 +00:00
|
|
|
foreach record $records {
|
|
|
|
$record get_channel_info
|
|
|
|
}
|
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
foreach record [lsort -command rsort $records] {
|
2011-06-14 11:48:55 +00:00
|
|
|
if {$favlist != "" && [$record get service_id] ni $favlist} {
|
|
|
|
continue
|
|
|
|
}
|
2011-06-09 21:16:30 +00:00
|
|
|
set num [$record get channel_num]
|
2011-09-19 17:11:18 +00:00
|
|
|
if {$num == 0} { continue }
|
2011-09-11 21:23:42 +00:00
|
|
|
altrow
|
2011-06-09 21:16:30 +00:00
|
|
|
puts "<td>$num</td>"
|
|
|
|
puts "<td>[$record channel_icon 50]</td>
|
|
|
|
<td>
|
2011-06-07 13:26:45 +00:00
|
|
|
<a href=/cgi-bin/epg_service.jim?service=[$record get service_id]>
|
|
|
|
[$record get channel_name]
|
|
|
|
</a></td>"
|
2011-06-16 03:10:41 +00:00
|
|
|
catch {
|
|
|
|
puts [$record cell]
|
|
|
|
puts [[$record next] cell]
|
|
|
|
}
|
2011-06-07 13:26:45 +00:00
|
|
|
puts "</tr>"
|
|
|
|
}
|
|
|
|
puts "</table>"
|
|
|
|
|
2011-06-14 11:48:55 +00:00
|
|
|
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>
|
|
|
|
"
|
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
set end [clock milliseconds]
|
|
|
|
puts "<font class=footnote>
|
2011-06-14 11:48:55 +00:00
|
|
|
Retrieved in: [expr [expr $got - $start] / 1000.0] seconds.
|
|
|
|
Rendered in: [expr [expr $end - $start] / 1000.0] seconds.
|
2011-06-07 13:26:45 +00:00
|
|
|
</font>"
|
|
|
|
|
|
|
|
epg cleanup
|
|
|
|
|