3 from Components.Sources.Source import Source
4 from ServiceReference import ServiceReference
11 def __init__(self, navcore,func=NOWNEXT):
14 self.navcore = navcore
15 self.epgcache = eEPGCache.getInstance()
17 def handleCommand(self,cmd):
21 if self.func is self.TITLE:
22 func = self.searchEvent
23 elif self.func is self.SERVICE:
24 func = self.getEPGofService
26 func = self.getEPGNowNext
28 return func(self.command)
30 def getEPGNowNext(self,serviceref):
31 print "getting EPG NOWNEXT", serviceref
32 events = self.epgcache.lookupEvent( ['IBDTSERNn',(serviceref,0,0,-1),(serviceref,0,1,-1)]);
38 def getEPGofService(self,cmd):
39 print "getting EPG of Service", cmd
40 events = self.epgcache.lookupEvent(['IBDTSERNn',(cmd,0,-1,-1)]);
46 def searchEvent(self,cmd):
47 print "getting EPG by title",cmd
48 events = self.epgcache.search(('IBDTSERNn',256,eEPGCache.PARTIAL_TITLE_SEARCH,cmd,1));
54 list = property(do_func)
55 lut = {"EventID": 0, "TimeStart": 1,"Duration": 2, "Title": 3, "Description": 4, "DescriptionExtended": 5, "ServiceReference": 6, "ServiceName": 7,"ShortServiceName": 8}