fix instant records (timers, deleted through the timer menu are still in the instant...
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 10 Apr 2006 20:02:52 +0000 (20:02 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 10 Apr 2006 20:02:52 +0000 (20:02 +0000)
instant recording list will be deleted now in that case)

lib/python/Screens/InfoBarGenerics.py

index 1dc0a1175769a6448519681ed642828a63b501b0..559d73dce737322a9a8c4167c03ce549e69b4029 100644 (file)
@@ -1065,11 +1065,16 @@ class InfoBarInstantRecord:
                return False
 
        def recordQuestionCallback(self, answer):
+               print "pre:\n", self.recording
+               
                if answer is None or answer[1] == "no":
                        return
                list = []
-               for x in self.recording:
-                       if x.dontSave and x.isRunning():
+               recording = self.recording[:]
+               for x in recording:
+                       if not x in self.session.nav.RecordTimer.timer_list:
+                               self.recording.remove(x)
+                       elif x.dontSave and x.isRunning():
                                list.append(TimerEntryComponent(x, False))              
 
                if answer[1] == "changeduration":
@@ -1090,6 +1095,8 @@ class InfoBarInstantRecord:
                                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)
+                       
+               print "after:\n", self.recording
 
        def changeDuration(self, entry):
                if entry is not None: