get rid of unneede global keywords
[vuplus_dvbapp] / lib / python / Screens / InfoBarGenerics.py
index b16594f..31108c8 100644 (file)
@@ -1573,7 +1573,7 @@ class InfoBarAdditionalInfo:
                        self["NimB_Active"].hide()
 
        def checkTunerState(self, service):
-               info = service.frontendInfo()
+               info = service and service.frontendInfo()
                feNumber = info and info.getFrontendInfo(iFrontendInformation.frontendNumber)
                if feNumber is None:
                        self["NimA"].hide()
@@ -1587,7 +1587,7 @@ class InfoBarAdditionalInfo:
 
        def gotServiceEvent(self, ev):
                service = self.session.nav.getCurrentService()
-               if ev == iPlayableService.evNewProgramInfo:
+               if ev == iPlayableService.evUpdatedInfo or ev == iPlayableService.evEnd:
                        self.checkTunerState(service)
 
 class InfoBarNotifications:
@@ -1609,6 +1609,11 @@ class InfoBarNotifications:
                        
                        Notifications.notifications = Notifications.notifications[1:]
                        cb = n[0]
+
+                       if n[3].has_key("onSessionOpenCallback"):
+                               n[3]["onSessionOpenCallback"]()
+                               del n[3]["onSessionOpenCallback"]
+
                        if cb is not None:
                                dlg = self.session.openWithCallback(cb, n[1], *n[2], **n[3])
                        else: