1 from Components.PerServiceDisplay import PerServiceBase
2 from Components.Element import cached
3 from enigma import iPlayableService
4 from Source import Source
6 class RadioText(PerServiceBase, Source, object):
7 def __init__(self, navcore):
9 PerServiceBase.__init__(self, navcore,
11 iPlayableService.evStart: self.gotEvent,
12 iPlayableService.evUpdatedRadioText: self.gotEvent,
13 iPlayableService.evEnd: self.gotEvent
18 service = self.navcore.getCurrentService()
19 return service and service.radioText()
21 radiotext = property(getText)
23 def gotEvent(self, what):
24 if what in [iPlayableService.evStart, iPlayableService.evEnd]:
25 self.changed((self.CHANGED_CLEAR,))
27 self.changed((self.CHANGED_ALL,))