add simple summary
[enigma2.git] / lib / python / Screens / ServiceInfo.py
index 9a8abdb13b8bb8382d277664de4c7a6a3a977898..d32c3e85b3d54c96df000aff40a468fc4a0d4ae2 100644 (file)
@@ -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)),