blob: c4c2f467ef93ca9a6114e686708327a5aa35ce9a (
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
|
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):
info = iStaticServiceInformationPtr()
if NavigationInstance.instance.ServiceHandler.info(self.ref, info):
info = None
return info
def __str__(self):
return self.ref.toString()
def getServiceName(self):
info = self.getStaticServiceInformation()
if not info:
return None
return info.getName(self.ref)
|