aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-15 17:03:58 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-15 17:03:58 +0000
commita3d4ed7a6cafe80056916cfc6f27e8d4df94a90d (patch)
tree95563bf33c666bd5d690dce02e4db8849e5d7d28
parent30cff3e17352e30c50d01b5cf03fbd8f762b4c75 (diff)
downloadenigma2-a3d4ed7a6cafe80056916cfc6f27e8d4df94a90d.tar.gz
enigma2-a3d4ed7a6cafe80056916cfc6f27e8d4df94a90d.zip
a zap timer is not a record timer (this fixes the no more working e2 shutdown
when a zap timer has zapped but the nowtime is smaller than the event endtime
-rw-r--r--timer.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/timer.py b/timer.py
index 96e38e15..5c664bbe 100644
--- a/timer.py
+++ b/timer.py
@@ -129,16 +129,22 @@ class Timer:
self.calcNextActivation()
self.on_state_change = [ ]
-
+
def stateChanged(self, entry):
for f in self.on_state_change:
f(entry)
-
+
def getNextRecordingTime(self):
- if len(self.timer_list) > 0:
- return self.timer_list[0].begin
+ llen = len(self.timer_list)
+ idx = 0
+ while idx < llen:
+ timer = self.timer_list[idx]
+ if timer.justplay:
+ idx += 1
+ else:
+ return timer.begin
return -1
-
+
def cleanup(self):
self.processed_timers = [entry for entry in self.processed_timers if entry.disabled]