1 from Components.PerServiceDisplay import PerServiceBase
2 from enigma import iPlayableService
3 from Source import Source
4 from Components.Element import cached
6 class CurrentService(PerServiceBase, Source):
7 def __init__(self, navcore):
9 PerServiceBase.__init__(self, navcore,
11 iPlayableService.evStart: self.serviceEvent,
12 iPlayableService.evEnd: self.serviceEvent,
13 # FIXME: we should check 'interesting_events'
14 # which is not always provided.
15 iPlayableService.evUpdatedInfo: self.serviceEvent,
16 iPlayableService.evUpdatedEventInfo: self.serviceEvent,
17 iPlayableService.evCuesheetChanged: self.serviceEvent,
18 iPlayableService.evVideoSizeChanged: self.serviceEvent
20 self.navcore = navcore
22 def serviceEvent(self, event):
23 self.changed((self.CHANGED_SPECIFIC, event))
26 def getCurrentService(self):
27 return self.navcore.getCurrentService()
29 service = property(getCurrentService)