Schedule all epsiodes of series

This commit is contained in:
Bob Buxton 2020-06-26 20:08:21 +01:00 committed by HummyPkg
parent ac4b392db8
commit 2884a82dbf

View File

@ -967,19 +967,29 @@ proc {rsv construct} {event type} {
set args(szFPBRecPath) "$args(szevtname)"
set events {}
set seen {}
set now [clock seconds]
set progs [lmap i [\
epg dbfetch dump -scrid [$event get series_crid] \
-sort start] {
if {[set ecrid [$i get event_crid]] eq ""} continue
if {$ecrid in $seen} continue
lappend seen $ecrid
if {[$i get start] < [$event get start]} {
if {[$i end] < $now} {
set args(usLastRecordedEvtId) [$i get event_id]
continue
}
if {$ecrid in $seen} continue
lappend seen $ecrid
lappend events [rsv mkaul $i]
list "1$::ccrid$ecrid"
}]
# set 1st event to record
binary scan [string range [lindex $events 0] 0 15] \
iiii service_id start end event_id
#puts "$service_id $start [clock format $end] $event_id"
set args(hsvc) $service_id
set args(nsttime) $start
set args(usevtid) $event_id
set args(nduration) $($end-$start)
set args(szEventToRecord) "[join $progs "|"]|"
set args(aulEventToRecordInfo) [join $events ""]
}