when no service is currently playing, serviceinfo is displayed without killing enigma2
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 14 Dec 2005 02:03:42 +0000 (02:03 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 14 Dec 2005 02:03:42 +0000 (02:03 +0000)
lib/python/Screens/ServiceInfo.py

index 9a8abdb..6b0a2e0 100644 (file)
@@ -51,8 +51,12 @@ class ServiceInfo(Screen):
                        self.info = service.info()
                else:
                        self.info = None
                        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)),
                                   ("Provider", self.getValue(iServiceInformation.sProvider)),
                                   ("VideoPID", self.getValue(iServiceInformation.sVideoPID)),
                                   ("AudioPID", self.getValue(iServiceInformation.sAudioPID)),