From a3d4ed7a6cafe80056916cfc6f27e8d4df94a90d Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Mon, 15 Jan 2007 17:03:58 +0000 Subject: [PATCH] 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 --- timer.py | 16 +++++++++++----- 1 file 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] -- 2.30.2