EPGRefreshTimer.py 文件源码

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

项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码
def setRefreshTimer(self, tocall):
        # Add refresh Timer
        now = localtime()
        begin = mktime(
            (now.tm_year, now.tm_mon, now.tm_mday,
            config.plugins.epgrefresh.begin.value[0],
            config.plugins.epgrefresh.begin.value[1],
            0, now.tm_wday, now.tm_yday, now.tm_isdst)
        )

        # If the last scan was finished before our timespan begins/began and
        # timespan began in the past fire the timer once (timer wouldn't do so
        # by itself)
        if config.plugins.epgrefresh.lastscan.value < begin and begin < time():
            tocall()

        refreshTimer = EPGRefreshTimerEntry(begin, tocall, nocheck = True)

        i = 0
        while i < 7:
            refreshTimer.setRepeated(i)
            i += 1

        # We can be sure that whenever this function is called the timer list
        # was wiped, so just add a new timer
        self.addTimerEntry(refreshTimer)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号