def getNextRecordingTimeOld(self, getNextStbPowerOn = False):
now = time()
if getNextStbPowerOn:
save_act = -1, 0
for timer in self.timer_list:
next_act = timer.getNextActivation(getNextStbPowerOn)
if timer.justplay or next_act + 3 < now:
continue
if debug: print "[recordtimer] next stb power up", strftime("%a, %Y/%m/%d %H:%M", localtime(next_act))
if save_act[0] == -1:
save_act = next_act, int(not timer.always_zap)
else:
if next_act < save_act[0]:
save_act = next_act, int(not timer.always_zap)
return save_act
else:
for timer in self.timer_list:
next_act = timer.getNextActivation()
if timer.justplay or next_act + 3 < now or timer.end == next_act:
continue
return next_act
return -1
评论列表
文章目录