#!/mod/bin/jimsh package require cgi source /mod/webif/lib/setup require epg.class spinner.class altrow epg_search totop [spinner new { text "Loading Now/Next Information..." size "1.2em" style "margin: 1em;" }] start require epg_popup set start [clock milliseconds] set now [clock seconds] set then $($now + 14400) if {$::qepg} { set records [epg dbfetch dump -trange "$now:$then"] } else { require channelsort set records [channelsort [epg fetch dump -trange "$now:$then"]] } set got [clock milliseconds] set favlist [epg favlist] puts { } set lcn 0 set num 0 foreach record $records { if {$favlist != "" && [$record get service_id] ni $favlist} { continue } set chnum [$record get channel_num] if {$chnum == 0} { continue } if {$chnum != $lcn} { if {$lcn > 0} { puts "" } altrow puts "" puts "" set lcn $chnum set num 0 } incr num if {$num < 4} { catch { puts [$record cell] } } } if {$lcn > 0} { puts "" } puts "
Channel On Now On Next On Later
$chnum[$record channel_icon 50] [$record get channel_name]
" puts " Visit settings to change EPG options.
" set end [clock milliseconds] puts " Retrieved in: [expr [expr $got - $start] / 1000.0] seconds. Rendered in: [expr [expr $end - $start] / 1000.0] seconds. " epg cleanup