fix typo
[enigma2.git] / timer.py
index 432c53a..a98481c 100644 (file)
--- a/timer.py
+++ b/timer.py
@@ -113,6 +113,11 @@ class Timer:
                for f in self.on_state_change:
                        f(entry)
                        
+       def getNextRecordingTime(self):
+               if len(self.timer_list) > 0:
+                       return self.timer_list[0].begin
+               return -1
+                       
        def cleanup(self):
                self.processed_timers = [entry for entry in self.processed_timers if entry.disabled]
        
@@ -163,7 +168,10 @@ class Timer:
        
        def timeChanged(self, timer):
                timer.timeChanged()
-               self.timer_list.remove(timer)
+               if timer.state == TimerEntry.StateEnded:
+                       self.processed_timers.remove(timer)
+               else:
+                       self.timer_list.remove(timer)
 
                self.addTimerEntry(timer)