1 from Components.VariableText import VariableText
2 from Components.Element import cached
3 from Components.GUIComponent import GUIComponent
4 from enigma import eEPGCache, eServiceReference as Ref, eLabel
5 from Source import Source
7 class ServiceEvent(VariableText, GUIComponent, Source, object):
10 GUIComponent.__init__(self)
11 VariableText.__init__(self)
16 #TODO Add a timer to get every minute the actual event..
17 #but this just make sense when the Servicelist do the same thing..
19 def getCurrentEvent(self):
20 epg = eEPGCache.getInstance()
21 return epg and self.cur_ref and epg.startTimeQuery(self.cur_ref) != -1 and epg.getNextTimeEntry() or None
23 event = property(getCurrentEvent)
25 def newService(self, ref):
27 if not ref or (ref.flags & Ref.flagDirectory) == Ref.flagDirectory or ref.flags & Ref.isMarker:
28 self.changed((self.CHANGED_CLEAR,))
30 self.changed((self.CHANGED_ALL,))