listboxcontent: fix alignment on empty label
[enigma2.git] / ServiceReference.py
1
2 from enigma import *
3
4 import NavigationInstance
5
6 class ServiceReference(eServiceReference):
7         def __init__(self, ref):
8                 if isinstance(ref, str):
9                         ref = eServiceReference(ref)
10                 self.ref = ref
11                 self.serviceHandler = eServiceCenter.getInstance()
12
13         def __str__(self):
14                 return self.ref.toString()
15         
16         def getServiceName(self):
17                 info = self.info()
18                 if info is None:
19                         return None
20                 
21                 return info.getName(self.ref)
22
23         def play(self):
24                 return self.serviceHandler.info(self.ref)
25         
26         def record(self):
27                 return self.serviceHandler.record(self.ref)
28         
29         def list(self):
30                 return self.serviceHandler.list(self.ref)
31         
32         def info(self):
33                 return self.serviceHandler.info(self.ref)
34
35         def offlineOperations(self):
36                 return self.serviceHandler.offlineOperations(self.ref)