aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources/CurrentService.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-06-26 16:31:52 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-06-26 16:31:52 +0000
commit1f820106cba412af1408ba56aa9cf51657e48857 (patch)
treeebddbf8d9799fd61fcbacbf405e0828fbcc730e4 /lib/python/Components/Sources/CurrentService.py
parentc980cfb00b3ee0679b8ea5fe4d45e1680a014681 (diff)
downloadenigma2-1f820106cba412af1408ba56aa9cf51657e48857.tar.gz
enigma2-1f820106cba412af1408ba56aa9cf51657e48857.zip
provide source/converter for current service name, current service provider
Diffstat (limited to 'lib/python/Components/Sources/CurrentService.py')
-rw-r--r--lib/python/Components/Sources/CurrentService.py22
1 files changed, 22 insertions, 0 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)