no bluescreen with old drivers
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 22 Dec 2006 19:13:37 +0000 (19:13 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 22 Dec 2006 19:13:37 +0000 (19:13 +0000)
lib/python/Screens/ServiceInfo.py

index c05bd25e8b254473ba3422d9e0628c04dd8e95a1..5973ec20d0676e28360b34237ff0307c935da64f 100644 (file)
@@ -106,11 +106,19 @@ class ServiceInfo(Screen):
                                aspect = "4:3"
                        else:
                                aspect = "16:9"
                                aspect = "4:3"
                        else:
                                aspect = "16:9"
-                       Labels = ( ("Name", name, TYPE_TEXT),
-                                          ("Provider", self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT),
-                                          ("Videoformat", aspect, TYPE_TEXT),
-                                          ("Videosize", "%dx%d" %(self.getServiceInfoValue(iServiceInformation.sVideoWidth), self.getServiceInfoValue(iServiceInformation.sVideoHeight)), TYPE_TEXT),
-                                          ("Namespace", self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8))
+                       width = self.info.getInfo(iServiceInformation.sVideoWidth)
+                       height = self.info.getInfo(iServiceInformation.sVideoHeight)
+                       if width != -1 and height != -1:
+                               Labels = ( ("Name", name, TYPE_TEXT),
+                                                  ("Provider", self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT),
+                                                  ("Videoformat", aspect, TYPE_TEXT),
+                                                  ("Videosize", "%dx%d" %(width, height), TYPE_TEXT),
+                                                  ("Namespace", self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8))
+                       else:
+                               Labels = ( ("Name", name, TYPE_TEXT),
+                                                  ("Provider", self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT),
+                                                  ("Videoformat", aspect, TYPE_TEXT),
+                                                  ("Namespace", self.getServiceInfoValue(iServiceInformation.sNamespace), TYPE_VALUE_HEX, 8))
                        self.fillList(Labels)
                else:
                        if self.transponder_info:
                        self.fillList(Labels)
                else:
                        if self.transponder_info: