aboutsummaryrefslogtreecommitdiff
path: root/ServiceReference.py
blob: 25181863c1307b638f18620aad99a75b226fc165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

from enigma import *

import NavigationInstance

class ServiceReference(eServiceReference):
	def __init__(self, ref):
		if isinstance(ref, str):
			ref = eServiceReference(ref)
		self.ref = ref

	def getStaticServiceInformation(self):
		return NavigationInstance.instance.ServiceHandler.info(self.ref)
	
	def __str__(self):
		return self.ref.toString()
	
	def getServiceName(self):
		info = self.getStaticServiceInformation()
		if info is None:
			return None
		
		return info.getName(self.ref)