instant record: fix detection if already running
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 25 Nov 2005 23:29:41 +0000 (23:29 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 25 Nov 2005 23:29:41 +0000 (23:29 +0000)
lib/python/Screens/InfoBarGenerics.py

index 4f75472871afcd2e32e2c675172939df78df58a0..671c7aa2db3307703a29c9364b6871d382f90af5 100644 (file)
@@ -421,11 +421,17 @@ class InfoBarInstantRecord:
                self["BlinkingPoint"].setConnect(lambda: self.recording.isRunning())
                #self["BlinkingPoint"].startBlinking()
 
+       def isInstantRecordRunning(self):
+               if self.recording != None:
+                       if self.recording.isRunning():
+                               return True
+               return False
+
        def recordQuestionCallback(self, answer):
                if answer == False:
                        return
                
-               if self.recording != None:
+               if self.isInstantRecordRunning():
                        self.stopCurrentRecording()
                else:
                        self.startInstantRecording()
@@ -437,7 +443,7 @@ class InfoBarInstantRecord:
                        self.session.open(MessageBox, "No HDD found!")
                        return
        
-               if self.recording != None:
+               if self.isInstantRecordRunning():
                        self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Do you want to stop the current\n(instant) recording?"))
                else:
                        self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Start recording?"))