From: Andreas Monzner Date: Mon, 15 Jan 2007 17:03:58 +0000 (+0000) Subject: a zap timer is not a record timer (this fixes the no more working e2 shutdown X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=a3d4ed7a6cafe80056916cfc6f27e8d4df94a90d 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 --- diff --git a/timer.py b/timer.py index 96e38e1..5c664bb 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]