diff options
Diffstat (limited to 'timer.py')
| -rw-r--r-- | timer.py | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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] |
