aboutsummaryrefslogtreecommitdiff
path: root/RecordTimer.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-08-19 12:49:36 +0200
committerghost <andreas.monzner@multimedia-labs.de>2009-08-19 12:49:36 +0200
commit508abbaab9864e95b0068a986e83ec9bca515ddf (patch)
treeffd5c530ee41601e285166ffd866f96b38134559 /RecordTimer.py
parent094cc2d96bc864825aaee214a60679879d163e28 (diff)
downloadenigma2-508abbaab9864e95b0068a986e83ec9bca515ddf.tar.gz
enigma2-508abbaab9864e95b0068a986e83ec9bca515ddf.zip
fix recordings from deepstandby when the current channel must be stopped because of lacking resources
Diffstat (limited to 'RecordTimer.py')
-rw-r--r--RecordTimer.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/RecordTimer.py b/RecordTimer.py
index 448a5003..42428889 100644
--- a/RecordTimer.py
+++ b/RecordTimer.py
@@ -190,6 +190,12 @@ class RecordTimerEntry(timer.TimerEntry, object):
self.log(4, "failed to write meta information")
else:
self.log(2, "'prepare' failed: error %d" % prep_res)
+
+ # we must calc nur start time before stopRecordService call because in Screens/Standby.py TryQuitMainloop tries to get
+ # the next start time in evEnd event handler...
+ self.do_backoff()
+ self.start_prepare = time.time() + self.backoff
+
NavigationInstance.instance.stopRecordService(self.record_service)
self.record_service = None
return False
@@ -232,10 +238,6 @@ class RecordTimerEntry(timer.TimerEntry, object):
self.log(8, "currently running service is not a live service.. so stop it makes no sense")
else:
self.log(8, "currently no service running... so we dont need to stop it")
-
- self.do_backoff()
- # retry
- 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.
@@ -575,9 +577,11 @@ class RecordTimer(timer.Timer):
def getNextRecordingTime(self):
now = time.time()
for timer in self.timer_list:
- if timer.justplay or timer.begin < now:
+ print "timer", timer
+ next_act = timer.getNextActivation()
+ if timer.justplay or next_act < now:
continue
- return timer.begin
+ return next_act
return -1
def isNextRecordAfterEventActionAuto(self):