#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow
header
require totop
[spinner new {
text "Loading EPG Data..."
size "1.2em"
style "margin: 1em;"
}] start
require epg_popup
set service [cgi_get service 4351]
set records [epg fetch dump -service $service]
set tr [lindex $records 0]
$tr get_channel_info
set channel_num [$tr get channel_num]
set channel_name [$tr get channel_name]
puts "
[$tr channel_icon 40 {vertical-align:middle}]
$channel_num - $channel_name
"
puts "
"
puts {
Date
Time
Programme
Synopsis
}
set i 0
foreach record $records {
altrow
#$record get_channel_info
set ended [$record ended]
if {[$record showing]} {
puts "
"
} else { puts "
" }
if $ended { puts "
" } else { puts "
" }
puts "[clock format [$record get start] -format "%a %d %b %Y"]
"
if $ended { puts "
" } else { puts "
" }
puts "[clock format [$record get start] -format "%H:%M"]