From 1f820106cba412af1408ba56aa9cf51657e48857 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 26 Jun 2006 16:31:52 +0000 Subject: provide source/converter for current service name, current service provider --- lib/python/Components/Sources/CurrentService.py | 22 ++++++++++++++++++++++ lib/python/Components/Sources/Makefile.am | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 lib/python/Components/Sources/CurrentService.py (limited to 'lib/python/Components/Sources') 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 + -- cgit v1.2.3