X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/acbad24424304473f967b678bd9deb51f73acf27..f12d2ae45356b4519383de70ad1be1bc755c4391:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index cdaa2c1e..986e2a41 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -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 @@ -403,7 +403,7 @@ class InfoBarEPG: self.eventView = None self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { - "showEventView": (self.openEventView, _("show EPG...")), + "showEventInfo": (self.openEventView, _("show EPG...")), "showEventInfoPlugin": (self.showEventInfoPlugins, _("show single service EPG...")), "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible, }) @@ -1312,7 +1312,6 @@ class InfoBarJobman: self.session.openWithCallback(self.JobViewCB, JobView, job) def JobViewCB(self, in_background): - from Screens.TaskView import JobView job_manager.in_background = in_background # depends on InfoBarExtensions @@ -1428,8 +1427,8 @@ class InfoBarInstantRecord: except: pass - begin = time() - end = time() + 3600 * 24 * 365 * 1 # 1 year + begin = int(time()) + end = begin + 3600 # dummy name = "instant record" description = "" eventid = None @@ -1450,19 +1449,28 @@ class InfoBarInstantRecord: recording = RecordTimerEntry(serviceref, begin, end, name, description, eventid, dirname = config.movielist.last_videodir.value) recording.dontSave = True - recording.autoincrease = True - - simulTimerList = self.session.nav.RecordTimer.record(recording) - if simulTimerList is not None: - print "timer conflict detected!" - if (len(simulTimerList) > 1): - print "tsc_list > 1" - recording.end = simulTimerList[1].begin - 30 + + if event is None or limitEvent == False: + recording.autoincrease = True + if recording.setAutoincreaseEnd(): self.session.nav.RecordTimer.record(recording) - print "new endtime applied" - else: - print "conflict with only one timer? ! ?" - self.recording.append(recording) + self.recording.append(recording) + else: + simulTimerList = self.session.nav.RecordTimer.record(recording) + if simulTimerList is not None: # conflict with other recording + name = simulTimerList[1].name + name_date = name + strftime(" %c", localtime(simulTimerList[1].begin)) + print "[TIMER] conflicts with", name_date + recording.autoincrease = True # start with max available length, then increment + if recording.setAutoincreaseEnd(): + self.session.nav.RecordTimer.record(recording) + self.recording.append(recording) + self.session.open(MessageBox, _("Record time limited due to conflicting timer %s" % name_date), MessageBox.TYPE_INFO) + else: + self.session.open(MessageBox, _("Couldn't record due to conflicting timer %s" % name), MessageBox.TYPE_INFO) + recording.autoincrease = False + else: + self.recording.append(recording) def isInstantRecordRunning(self): print "self.recording:", self.recording @@ -1535,7 +1543,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):