git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d5483c
)
fix cancellation of broken timer entries
author
Felix Domke
<tmbinc@elitedvb.net>
Fri, 7 Apr 2006 20:58:45 +0000
(20:58 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Fri, 7 Apr 2006 20:58:45 +0000
(20:58 +0000)
RecordTimer.py
patch
|
blob
|
history
timer.py
patch
|
blob
|
history
diff --git
a/RecordTimer.py
b/RecordTimer.py
index 386e03f06da3841063b3b5b063c5af81a87f7c82..b131e5bf2d5a118642099412049a85d84dabd5df 100644
(file)
--- a/
RecordTimer.py
+++ b/
RecordTimer.py
@@
-61,6
+61,7
@@
class RecordTimerEntry(timer.TimerEntry):
def resetState(self):
self.state = self.StateWaiting
def resetState(self):
self.state = self.StateWaiting
+ self.cancelled = False
self.first_try_prepare = True
self.timeChanged()
self.first_try_prepare = True
self.timeChanged()
@@
-148,6
+149,10
@@
class RecordTimerEntry(timer.TimerEntry):
self.start_prepare = time.time() + self.backoff
return False
elif next_state == self.StateRunning:
self.start_prepare = time.time() + self.backoff
return False
elif next_state == self.StateRunning:
+ # if this timer has been cancelled, just go to "end" state.
+ if self.cancelled:
+ return True
+
if self.justplay:
self.log(11, "zapping")
NavigationInstance.instance.playService(self.service_ref.ref)
if self.justplay:
self.log(11, "zapping")
NavigationInstance.instance.playService(self.service_ref.ref)
diff --git
a/timer.py
b/timer.py
index a98481c0a3f957bcf0cff965f2a8de1e785feb2c..3caa288db0a81cd2e56b04756175d02bf2774d9c 100644
(file)
--- a/
timer.py
+++ b/
timer.py
@@
-81,6
+81,8
@@
class TimerEntry:
# set begin to now.
if self.begin > self.end:
self.begin = self.end
# set begin to now.
if self.begin > self.end:
self.begin = self.end
+
+ self.cancelled = True
# must be overridden!
def getNextActivation():
# must be overridden!
def getNextActivation():