From 3cee22533172fc8d93f9abafefe9131f021b1930 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Mon, 13 Mar 2017 18:18:08 +0000 Subject: [PATCH] Deprecate {epg fetch} for {epg dbfetch} --- webif/cgi-bin/epg/search.jim | 6 +++--- webif/html/epg/list.jim | 2 +- webif/html/m/event_d.jim | 2 +- webif/html/m/search.jim | 1 - webif/html/sched/rpc/skip.jim | 2 +- webif/html/xepg/index.jim | 2 +- webif/lib/epg.class | 10 ++++++---- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/webif/cgi-bin/epg/search.jim b/webif/cgi-bin/epg/search.jim index f2f6b39..64b0f97 100755 --- a/webif/cgi-bin/epg/search.jim +++ b/webif/cgi-bin/epg/search.jim @@ -42,12 +42,12 @@ if {$searchfull} { set cmd "searchall" } set dedup 0 if {$ct > 0 } { - set records [epg fetch dump -type $ct] + set records [epg dbfetch dump -type $ct] if {[[settings] genrededup]} { set dedup 1 } } elseif {$crid ne ""} { - set records [epg fetch dump -crid $crid] + set records [epg dbfetch dump -crid $crid] } elseif {$scrid ne ""} { - set records [epg fetch dump -scrid $scrid] + set records [epg dbfetch dump -scrid $scrid] } elseif {$searchterm ne ""} { set records [epg dbfetch $cmd -term $searchterm] } else { diff --git a/webif/html/epg/list.jim b/webif/html/epg/list.jim index 467e5c6..2ec7445 100755 --- a/webif/html/epg/list.jim +++ b/webif/html/epg/list.jim @@ -32,7 +32,7 @@ if {$::qepg} { } } else { require channelsort - set records [channelsort [epg fetch dump -trange "$now:$then"]] + set records [channelsort [epg dbfetch dump -trange "$now:$then"]] } set got [clock milliseconds] diff --git a/webif/html/m/event_d.jim b/webif/html/m/event_d.jim index 050c443..1d1c727 100755 --- a/webif/html/m/event_d.jim +++ b/webif/html/m/event_d.jim @@ -11,7 +11,7 @@ set eid [cgi_get eid 0] mheader -set record [lindex [epg fetch dump -service $sid -event $eid] 0] +set record [lindex [epg dbfetch dump -service $sid -event $eid] 0] $record get_channel_info set others [$record othertimes] diff --git a/webif/html/m/search.jim b/webif/html/m/search.jim index 61519d5..b3e31f6 100755 --- a/webif/html/m/search.jim +++ b/webif/html/m/search.jim @@ -20,7 +20,6 @@ puts "" set cmd search if {$full} { set cmd searchall } if {$term ne ""} { - #set records [epg fetch $cmd -extra $term] set records [epg dbfetch $cmd -term $term] } else { set records {} diff --git a/webif/html/sched/rpc/skip.jim b/webif/html/sched/rpc/skip.jim index 7dd4bed..a8f26d4 100755 --- a/webif/html/sched/rpc/skip.jim +++ b/webif/html/sched/rpc/skip.jim @@ -16,7 +16,7 @@ foreach slot [split $slots ","] { puts "SLOT: $slot" set event [rsv slot $slot] - lassign [epg fetch dump -service $xservice -event $xevent] epg + lassign [epg dbfetch dump -service $xservice -event $xevent] epg if {$epg eq ""} { puts "!Cannot find event in EPG." diff --git a/webif/html/xepg/index.jim b/webif/html/xepg/index.jim index e73889e..f2cb812 100755 --- a/webif/html/xepg/index.jim +++ b/webif/html/xepg/index.jim @@ -84,7 +84,7 @@ if {$::qepg} { set records [epg dbfetch dump {*}$args] } else { require channelsort - set records [channelsort [epg fetch dump -trange "$stt:$ett"]] + set records [channelsort [epg dbfetch dump -trange "$stt:$ett"]] } set got [clock milliseconds] diff --git a/webif/lib/epg.class b/webif/lib/epg.class index d182e21..98e1e5b 100644 --- a/webif/lib/epg.class +++ b/webif/lib/epg.class @@ -300,7 +300,7 @@ epg method cell {} { epg method next {} { set tm $($start + $duration + 60) - set nextlist [epg fetch dump -service $service_id -time $tm] + set nextlist [epg dbfetch dump -service $service_id -time $tm] if {[llength nextlist] > 0} { return [lindex $nextlist 0] @@ -311,7 +311,7 @@ epg method next {} { epg method previous {} { set tm $($start - 60) - set prevlist [epg fetch dump -service $service_id -time $tm] + set prevlist [epg dbfetch dump -service $service_id -time $tm] if {[llength prevlist] > 0} { return [lindex $prevlist 0] @@ -324,7 +324,7 @@ epg method recommended {} { set rec "" if {$rec_crid ne ""} { catch { set rec [lindex [ - epg fetch dump -crid $rec_crid] 0] } + epg dbfetch dump -crid $rec_crid] 0] } } return $rec } @@ -333,7 +333,7 @@ epg method othertimes {} { if {$event_crid eq ""} { return "" } set others "" - foreach other [epg fetch dump -crid $event_crid] { + foreach other [epg dbfetch dump -crid $event_crid] { if {[$other get service_id] == $service_id && [$other get event_id] == $event_id} { continue } lappend others $other @@ -490,6 +490,8 @@ proc {epg dbfetch} {mode args} { return $records } +# This function is deprecated in favour of {epg dbfetch} and should not be +# used. proc {epg fetch} {mode args} { set records "" foreach line [split [epg exec $mode {*}$args] "\n"] {