2011-06-08 23:33:35 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2011-07-01 22:56:53 +00:00
|
|
|
source /mod/var/mongoose/lib/setup
|
|
|
|
require epg.class
|
2011-06-08 23:33:35 +00:00
|
|
|
|
|
|
|
puts "Content-Type: text/html"
|
|
|
|
puts ""
|
|
|
|
|
|
|
|
cgi_input
|
|
|
|
#cgi_dump
|
|
|
|
|
2011-08-29 22:34:26 +00:00
|
|
|
set service [cgi_get service 0]
|
|
|
|
set event [cgi_get event 0]
|
2011-07-01 22:56:53 +00:00
|
|
|
if {! [dict exists $_cgi bare]} { header }
|
2011-06-08 23:33:35 +00:00
|
|
|
|
|
|
|
set record [lindex [epg fetch dump -service $service -event $event] 0]
|
2011-06-14 11:48:55 +00:00
|
|
|
$record get_channel_info
|
2011-07-18 19:26:58 +00:00
|
|
|
set others [$record othertimes]
|
|
|
|
|
2011-06-08 23:33:35 +00:00
|
|
|
puts "
|
|
|
|
<table class=keyval>
|
|
|
|
<tr>
|
|
|
|
<th>Programme</th>
|
|
|
|
<td>[$record get name]</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th>Synopsis</th>
|
|
|
|
<td>[$record get text]</td>
|
|
|
|
</tr><tr>
|
|
|
|
<th>Start</th>
|
2011-07-18 19:26:58 +00:00
|
|
|
<td>[clock format [$record get start] -format {%c %Z}]
|
|
|
|
"
|
|
|
|
|
|
|
|
foreach o $others {
|
|
|
|
if {[$o ended]} { continue }
|
|
|
|
$o get_channel_info
|
|
|
|
$o process_sched
|
|
|
|
if {[$o get series_crid] eq ""} { set ro 1 } else { set ro 2 }
|
|
|
|
puts -nonewline "<br><font class=also> "
|
|
|
|
puts -nonewline "Also: "
|
|
|
|
puts -nonewline "<a class=event href=# xs=[$o get service_id] "
|
|
|
|
puts -nonewline "xe=[$o get event_id] "
|
|
|
|
puts -nonewline "sch=[$o get sched_type] rec=$ro>"
|
|
|
|
puts -nonewline "[clock format [$o get start] -format {%c %Z}]"
|
|
|
|
puts -nonewline " on "
|
|
|
|
puts -nonewline [$o channel_icon 16]
|
|
|
|
puts -nonewline "[$o get channel_name] "
|
|
|
|
puts "</a>"
|
|
|
|
puts "</font>"
|
|
|
|
}
|
|
|
|
|
|
|
|
puts "
|
|
|
|
</td>
|
2011-06-08 23:33:35 +00:00
|
|
|
</tr><tr>
|
|
|
|
<th>Duration</th>
|
2011-07-11 23:29:21 +00:00
|
|
|
<td>[clock format [$record get duration] -format %T]
|
|
|
|
"
|
|
|
|
if {[$record showing]} {
|
|
|
|
puts [progressbar [$record percent]]
|
|
|
|
}
|
|
|
|
puts "
|
|
|
|
</td>
|
2011-06-08 23:33:35 +00:00
|
|
|
</tr><tr>
|
|
|
|
<th>Type</th>
|
|
|
|
<td>[$record get content_type] ([$record get content_code])</td>
|
|
|
|
</tr>
|
|
|
|
"
|
|
|
|
|
|
|
|
if {[$record get warning] != ""} {
|
|
|
|
puts "
|
|
|
|
<tr>
|
|
|
|
<th>Warning</th>
|
|
|
|
<td>[$record get warning]</td>
|
|
|
|
</tr>
|
|
|
|
"
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[$record get event_crid] != ""} {
|
|
|
|
puts "
|
|
|
|
<tr>
|
2011-07-18 19:26:58 +00:00
|
|
|
<th>CRID</th><td>
|
|
|
|
<a href=/cgi-bin/epg_search.jim?crid=[$record get event_crid]>
|
|
|
|
<img border=0 height=14
|
|
|
|
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
|
|
|
[$record get channel_crid][$record get event_crid]
|
|
|
|
</a>
|
|
|
|
</td>
|
2011-06-08 23:33:35 +00:00
|
|
|
</tr>
|
|
|
|
"
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[$record get series_crid] != ""} {
|
|
|
|
puts "
|
|
|
|
<tr>
|
|
|
|
<th nowrap>Series CRID</th><td>
|
|
|
|
<a href=/cgi-bin/epg_search.jim?scrid=[$record get series_crid]>
|
2011-06-09 21:16:30 +00:00
|
|
|
<img border=0 height=14
|
2011-06-09 00:42:26 +00:00
|
|
|
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
2011-06-08 23:33:35 +00:00
|
|
|
[$record get channel_crid][$record get series_crid]
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
"
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[$record get rec_crid] != ""} {
|
|
|
|
set rec [$record recommended]
|
|
|
|
if {$rec != ""} {
|
|
|
|
puts "<tr><th>Recommends</th><td>
|
|
|
|
<a href=/cgi-bin/epg_search.jim?crid=[$rec get event_crid]>
|
2011-06-09 21:16:30 +00:00
|
|
|
<img border=0 height=14
|
2011-06-09 00:42:26 +00:00
|
|
|
src=/images/421_1_00_CH_Title_2R_Arrow.png>
|
2011-06-08 23:33:35 +00:00
|
|
|
[$rec get name]
|
|
|
|
([$rec get channel_crid][$rec get event_crid])
|
|
|
|
</a>
|
|
|
|
</td></tr>"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
puts "
|
|
|
|
<tr>
|
2011-06-09 00:42:26 +00:00
|
|
|
<td colspan=2 valign=top>
|
2011-06-14 11:48:55 +00:00
|
|
|
[$record channel_icon 70]
|
2011-06-09 00:42:26 +00:00
|
|
|
[join [$record icon_set] " "]
|
2011-06-08 23:33:35 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2011-06-09 21:16:30 +00:00
|
|
|
|
|
|
|
<a class=footnote href=/cgi-bin/epg_dump.jim?service=[$record get service_id]&event=[$record get event_id]&raw=1>
|
|
|
|
<img border=0 src=/images/532_1_00_Find_Path_Arrow.png>
|
|
|
|
Show raw EPG info
|
|
|
|
</a>
|
2011-06-08 23:33:35 +00:00
|
|
|
"
|
|
|
|
|
2011-07-11 23:29:21 +00:00
|
|
|
puts "<div id=epginfo_extra class=footnote></div>"
|
|
|
|
|
2011-06-08 23:33:35 +00:00
|
|
|
epg cleanup
|
2011-07-01 22:56:53 +00:00
|
|
|
if {! [dict exists $_cgi bare]} { footer }
|
2011-06-08 23:33:35 +00:00
|
|
|
|