diff options
Diffstat (limited to 'lib/python/Components/Sources')
| -rw-r--r-- | lib/python/Components/Sources/CurrentService.py | 22 | ||||
| -rw-r--r-- | lib/python/Components/Sources/Makefile.am | 3 |
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/python/Components/Sources/CurrentService.py b/lib/python/Components/Sources/CurrentService.py new file mode 100644 index 00000000..bec6d2dc --- /dev/null +++ b/lib/python/Components/Sources/CurrentService.py @@ -0,0 +1,22 @@ +from Components.PerServiceDisplay import PerServiceBase +from enigma import iPlayableService +from Source import Source + +class CurrentService(PerServiceBase, Source): + def __init__(self, navcore): + Source.__init__(self) + PerServiceBase.__init__(self, navcore, + { + iPlayableService.evStart: self.changed, + iPlayableService.evEnd: self.changed + }) + self.navcore = navcore + + def getCurrentService(self): + service = self.navcore.getCurrentService() + return service + + def stopEvent(self): + self.changed() + + service = property(getCurrentService) diff --git a/lib/python/Components/Sources/Makefile.am b/lib/python/Components/Sources/Makefile.am index 9e151123..a7d5ae90 100644 --- a/lib/python/Components/Sources/Makefile.am +++ b/lib/python/Components/Sources/Makefile.am @@ -1,5 +1,6 @@ installdir = $(LIBDIR)/enigma2/python/Components/Sources install_PYTHON = \ - __init__.py Clock.py EventInfo.py Source.py MenuList.py + __init__.py Clock.py EventInfo.py Source.py MenuList.py CurrentService.py + |
