RecordTimer.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:enigma2 作者: OpenLD 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号