better tabs?
[enigma2.git] / RecordTimer.py
index 45a21ae..d893382 100644 (file)
@@ -103,6 +103,13 @@ class RecordTimer(timer.Timer):
                        self.loadTimer()
                except:
                        print "unable to load timers from file!"
+                       
+       def isRecording(self):
+               isRunning = False
+               for timer in self.timer_list:
+                       if timer.isRunning():
+                               isRunning = True
+               return isRunning
        
        def loadTimer(self):
                # TODO: PATH!
@@ -148,6 +155,8 @@ class RecordTimer(timer.Timer):
 
        def removeEntry(self, entry):
                print "[Timer] Remove " + str(entry)
+               
+               entry.repeated = False
 
                if entry.state == timer.TimerEntry.StateRunning:
                        print "remove running timer."
@@ -156,8 +165,12 @@ class RecordTimer(timer.Timer):
                elif entry.state != timer.TimerEntry.StateEnded:
                        entry.activate(timer.TimerEntry.EventAbort)
                        self.timer_list.remove(entry)
+
                        self.calcNextActivation()
                        print "timer did not yet start - removing"
+
+                       # the timer was aborted, and removed.
+                       return
                else:
                        print "timer did already end - doing nothing."