fix deathscreen in some conditions (thx to adenin)
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index b923340cfcca576d710c1359abc467a9cc6a3924..79747a613f05d148f81c6c07e7f34ad0d11fda79 100644 (file)
@@ -348,14 +348,14 @@ class InfoBarMenu:
 
        def mainMenu(self):
                print "loading mainmenu XML..."
-               menu = mdom.childNodes[0]
-               assert menu.tagName == "menu", "root element in menu must be 'menu'!"
+               menu = mdom.getroot()
+               assert menu.tag == "menu", "root element in menu must be 'menu'!"
 
                self.session.infobar = self
                # so we can access the currently active infobar from screens opened from within the mainmenu
                # at the moment used from the SubserviceSelection
 
-               self.session.openWithCallback(self.mainMenuClosed, MainMenu, menu, menu.childNodes)
+               self.session.openWithCallback(self.mainMenuClosed, MainMenu, menu)
 
        def mainMenuClosed(self, *val):
                self.session.infobar = None
@@ -1427,8 +1427,8 @@ class InfoBarInstantRecord:
                except:
                        pass
 
-               begin = time()
-               end = time() + 3600 * 24 * 365 * 1 # 1 year
+               begin = int(time())
+               end = begin + 3600 * 24 * 365 * 1 # 1 year
                name = "instant record"
                description = ""
                eventid = None
@@ -1534,7 +1534,7 @@ class InfoBarInstantRecord:
                        print "stopping recording after", int(value), "minutes."
                        if int(value) != 0:
                                self.recording[self.selectedEntry].autoincrease = False
-                       self.recording[self.selectedEntry].end = time() + 60 * int(value)
+                       self.recording[self.selectedEntry].end = int(time()) + 60 * int(value)
                        self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry])
 
        def instantRecord(self):