X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/0329b4216112f4591e758ff2407002500abb0bf6..85f5c84f1e3e4d22fb1939751d39de03877b93d8:/lib/python/Screens/ServiceInfo.py diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py index 9a8abdb1..d32c3e85 100644 --- a/lib/python/Screens/ServiceInfo.py +++ b/lib/python/Screens/ServiceInfo.py @@ -12,10 +12,10 @@ RT_HALIGN_LEFT = 0 def ServiceInfoListEntry(a, b): res = [ ] - #PyObject *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags; - res.append((0, 0, 200, 30, 0, RT_HALIGN_LEFT, "")) - res.append((0, 0, 150, 25, 0, RT_HALIGN_LEFT, a)) - res.append((170, 0, 150, 25, 0, RT_HALIGN_LEFT, b)) + #PyObject *type, *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags; + res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 200, 30, 0, RT_HALIGN_LEFT, "")) + res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 150, 25, 0, RT_HALIGN_LEFT, a)) + res.append((eListboxPythonMultiContent.TYPE_TEXT, 170, 0, 150, 25, 0, RT_HALIGN_LEFT, b)) return res @@ -25,7 +25,7 @@ class ServiceInfoList(HTMLComponent, GUIComponent): self.l = eListboxPythonMultiContent() self.list = source self.l.setList(self.list) - self.l.setFont(0, gFont("Arial", 23)) + self.l.setFont(0, gFont("Regular", 23)) def GUIcreate(self, parent): self.instance = eListbox(parent) @@ -51,8 +51,12 @@ class ServiceInfo(Screen): self.info = service.info() else: self.info = None - - Labels = ( ("Name", ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()), + + if self.session.nav.getCurrentlyPlayingServiceReference() is not None: + name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName() + else: + name = "N/A" + Labels = ( ("Name", name), ("Provider", self.getValue(iServiceInformation.sProvider)), ("VideoPID", self.getValue(iServiceInformation.sVideoPID)), ("AudioPID", self.getValue(iServiceInformation.sAudioPID)),