prep_res=self.record_service.prepare(self.Filename + ".ts", self.begin, self.end, event_id)
if prep_res:
self.log(2, "'prepare' failed: error %d" % prep_res)
+ NavigationInstance.instance.stopRecordService(self.record_service)
self.record_service = None
return False
f.close()
except IOError:
self.log(4, "failed to write meta information")
+ NavigationInstance.instance.stopRecordService(self.record_service)
self.record_service = None
return False
return True
return True
if self.justplay:
- self.log(11, "zapping")
- NavigationInstance.instance.playService(self.service_ref.ref)
+ if Screens.Standby.inStandby:
+ self.log(11, "wakeup and zap")
+ #set service to zap after standby
+ Screens.Standby.inStandby.prev_running_service = self.service_ref.ref
+ #wakeup standby
+ Screens.Standby.inStandby.Power()
+ else:
+ self.log(11, "zapping")
+ NavigationInstance.instance.playService(self.service_ref.ref)
return True
else:
self.log(11, "start recording")
file.write(x)
file.close()
+ def getNextZapTime(self):
+ llen = len(self.timer_list)
+ idx = 0
+ now = time.time()
+ while idx < llen:
+ timer = self.timer_list[idx]
+ if not timer.justplay or timer.begin < now:
+ idx += 1
+ else:
+ return timer.begin
+ return -1
+
def getNextRecordingTime(self):
llen = len(self.timer_list)
idx = 0
+ now = time.time()
while idx < llen:
timer = self.timer_list[idx]
- if timer.justplay:
+ if timer.justplay or timer.begin < now:
idx += 1
else:
return timer.begin