use s-crid:e-crid as key for recorded programmes

This commit is contained in:
Bob Buxton 2020-05-14 15:59:40 +01:00 committed by HummyPkg
parent b99327a562
commit e3da17ca6c
2 changed files with 33 additions and 21 deletions

View File

@ -208,7 +208,7 @@ epg method scheduled {{debug 0}} {
"$service_id:$event_id" \
"$channel_hsvc:$event_id" \
[string tolower "$service_id:$channel_crid$series_crid"] \
[string tolower "$service_id:$channel_crid$event_crid"] \
[string tolower "$channel_crid$series_crid:$channel_crid$event_crid"] \
] {
if {$debug} {puts "Check key ($key)"}
if {[dict exists $rsvlookup $key]} {
@ -567,4 +567,3 @@ proc {epg channellist} {{field usLcn}} {
return $channels
}

View File

@ -744,7 +744,8 @@ proc {rsv lookuptab} {} {
foreach tab {tbl_reservation pending} {
set res [[rsv dbhandle] query "
select usSvcId, usevtid, ucCRIDType, szCRID,
ucRecKind, aulEventToRecordInfo
ucRecKind, aulEventToRecordInfo,
szRecordedProgCrid
from $tab left join channel.TBL_SVC
on $tab.hSvc = channel.TBL_SVC.hSvc
where ersvtype <= 3
@ -766,6 +767,15 @@ proc {rsv lookuptab} {} {
} else {
continue
}
foreach r [split $rec(szRecordedProgCrid) "|"] {
if {$r != {}} {
set records([string tolower "\
$rec(szCRID):\
[string range $r 1 end]"]) "R"
}
}
set aul $rec(aulEventToRecordInfo)
if {[string length $aul]} {
@ -777,12 +787,16 @@ proc {rsv lookuptab} {} {
}
} else {
set records([\
string tolower "$rec(usSvcId):$rec(szCRID)"]) $p
}
}
}
# Add all skipped epsisodes for all series
set skiplist [rsv _skiplist]
foreach skip $skiplist {
set records($skip) "X"
}
return $records
}
@ -1700,4 +1714,3 @@ proc {rsv reassert_skips} {{debug false}} {
rsv commit
}
}