+ list = []
+ for x in self.recording:
+ if x.dontSave:
+ list.append(TimerEntryComponent(x, False))
+
+ if answer[1] == "changeduration":
+ if len(self.recording) == 1:
+ self.changeDuration(0)
+ else:
+ self.session.openWithCallback(self.changeDuration, TimerSelection, list)
+ elif answer[1] == "stop":
+ if len(self.recording) == 1:
+ self.stopCurrentRecording(0)
+ else:
+ self.session.openWithCallback(self.stopCurrentRecording, TimerSelection, list)
+ if answer[1] == "indefinitely" or answer[1] == "manualduration" or answer[1] == "event":
+ limitEvent = False
+ if answer[1] == "event":
+ limitEvent = True
+ if answer[1] == "manualduration":
+ self.selectedEntry = len(self.recording)
+ self.session.openWithCallback(self.inputCallback, InputBox, title=_("How many minutes do you want to record?"), text="5", maxSize=False, type=Input.NUMBER)
+ self.startInstantRecording(limitEvent = limitEvent)
+
+ def changeDuration(self, entry):
+ if entry is not None:
+ self.selectedEntry = entry
+ self.session.openWithCallback(self.inputCallback, InputBox, title=_("How many minutes do you want to record?"), text="5", maxSize=False, type=Input.NUMBER)
+
+ def inputCallback(self, value):
+ if value is not None:
+ print "stopping recording after", int(value), "minutes."
+ self.recording[self.selectedEntry].end = time.time() + 60 * int(value)
+ self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry])