aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/ServiceName.py
blob: c6dcbb7a98761ebfddf0e12b8046adf24f23bfaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from PerServiceDisplay import *

#from enigma import pNavigation, iServiceInformationPtr
from enigma import *

class ServiceName(PerServiceDisplay):
	def __init__(self, navcore):
		PerServiceDisplay.__init__(self, navcore,
			{
				pNavigation.evNewService: self.newService,
				pNavigation.evStopService: self.stopEvent
			})

	def newService(self):
		service = self.navcore.getCurrentService()
		
		print service
		
		if service is not None:
			info = service.info()
			if info is not None:
				self.setText(info.getName())
				setLCD(info.getName())
	
	def stopEvent(self):
			self.setText("");