provide source/converter for current service name, current service provider
[enigma2.git] / lib / python / Components / Sources / CurrentService.py
1 from Components.PerServiceDisplay import PerServiceBase
2 from enigma import iPlayableService
3 from Source import Source
4
5 class CurrentService(PerServiceBase, Source):
6         def __init__(self, navcore):
7                 Source.__init__(self)
8                 PerServiceBase.__init__(self, navcore, 
9                         { 
10                                 iPlayableService.evStart: self.changed,
11                                 iPlayableService.evEnd: self.changed 
12                         })
13                 self.navcore = navcore
14
15         def getCurrentService(self):
16                 service = self.navcore.getCurrentService()
17                 return service
18
19         def stopEvent(self):
20                 self.changed()
21
22         service = property(getCurrentService)