I can reproduce this with eg BBC 4HD in the WebIf EPG starting at 03:30 and hours set to 1, SeaMonkey 2.53.6, under conditions like those proposed by
@hairy_mutley: the channel line is not shown if no programme either starts or ends (as each end is followed by a start, this may be the same thing, off-by-1s) within the bounds of the scaled EPG, with the start and end times not included.
When off the air, the channel has 2-hour "This is BBC Four" programmes starting at 03:30. With EPG start (stt) = 03:30 and hours = 2, there is no BBC4HD line; with hours = 2.05, it reappears. Similarly, with start = 04:00 and hours = 1.5, there's no line; with hours = 1.55, it reappears (including the previous programme partially within the scaled period).
Each line of the EPG display comprises a div with class xechan (the channel cell) followed by a sequence of divs with class xeprog and a fixed pixel width calculated from the hour scale as a proportion of 1000px, representing each scheduled programme. The whole EPG is a sequence of such divs: there isn't any per-row nesting (maybe a 2-column table with a row per channel would have been a more semantically accurate structure).
The Mozilla developer tools as well as the View source function show all the divs for BBC FOUR HD absent from the page, which fingers this in
/mod/webif/html/xepg/index.jim
(line 82ff., 87 in particular), as an empty records is the only condition that doesn't write the channel cell:
Code:
if {$::qepg} {
set args [list -trange "$stt:$ett" -ljoin 1]
if {$favgroup} {
lappend args -fav $favgroup
}
set records [epg dbfetch dump {*}$args]
} else {
...
Apparently it only asks for EPG data within the scale of the display: here stt is the start time rounded down to the nearest half-hour and ett is the scaled end time.
The problem is in
/mod/webif/lib/epg.class
: a typo where $stt should be $ett, but also a logical one where the opposite of < is >= and not >, I think.
Code:
--- /mod/webif/lib/epg.class.org
+++ /mod/webif/lib/epg.class
@@ -480,11 +480,11 @@
-trange {
lassign [split $v :] stt ett
append q "and (e.start is null or
(e.start > $stt and e.start < $ett) or
(e.end > $stt and e.end < $ett) or
- (e.start < $stt and e.end > $stt)
+ (e.start <= $stt and e.end >= $ett)
) "
}
-fav {
set v $(1 << ($v - 1))
append from \