#!/mod/bin/jimsh package require cgi source /mod/webif/lib/setup require epg.class spinner.class altrow settings.class header require totop puts "" set ct [cgi_get ct 0] set crid [cgi_get crid ""] set scrid [cgi_get scrid ""] if {[cgi_exists term]} { set lterm [cgi_get term] if {[string match {CRID:*} $lterm]} { set crid [string range $lterm 5 end] } elseif {[string match {SCRID:*} $lterm]} { set scrid [string range $lterm 6 end] } } elseif {$crid ne ""} { set _cgi(term) "CRID:$crid" } elseif {$scrid ne ""} { set _cgi(term) "SCRID:$scrid" } require epg_search [spinner new { text "Searching EPG..." size "1.2em" style "margin: 1em;" }] start require epg_popup set cmd "search" if {$searchfull} { set cmd "searchall" } set dedup 0 if {$ct > 0 } { set records [epg fetch dump -type $ct] if {[[settings] genrededup]} { set dedup 1 } } elseif {$crid ne ""} { set records [epg fetch dump -crid $crid] } elseif {$scrid ne ""} { set records [epg fetch dump -scrid $scrid] } elseif {$searchterm ne ""} { set records [epg dbfetch $cmd -term $searchterm] } else { set records {} } set favlist [epg favlist] if {[llength $records] > 0} { puts {
Date | Channel | Programme | Synopsis | " } else { puts " | "}
puts "
[clock format [$record get start] -format "%a %d %b %Y"] [clock format [$record get start] -format "%H:%M %Z"]" puts " | "
puts "[$record get channel_num] | " puts "[$record channel_icon 50] | " puts "[$record get channel_name] | " puts [$record cell] puts "[$record get text] | [$record get warning] | " puts "" } puts "
---|