From c4bd16f63a6703a9672e91e6876477d4d18e80fa Mon Sep 17 00:00:00 2001 From: "Dr.Best" Date: Thu, 4 Sep 2014 23:23:40 +0200 Subject: [PATCH] [EPGRefresh] overwrite calcNextActivation() method for removing timewarp process --> if eDVBLocalTimeHandler is updating the transponder time (negativ), the timewarp code in the orginal calcNextActivation() method is the reason why epgrefresh triggers all remaining refresh timers at once. --- epgrefresh/src/EPGRefreshTimer.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/epgrefresh/src/EPGRefreshTimer.py b/epgrefresh/src/EPGRefreshTimer.py index 9d8f970a..fde6d66a 100644 --- a/epgrefresh/src/EPGRefreshTimer.py +++ b/epgrefresh/src/EPGRefreshTimer.py @@ -159,5 +159,28 @@ class EPGRefreshTimer(timer.Timer): def isActive(self): return len(self.timer_list) > 0 + + def calcNextActivation(self): + # FIXME FIXME FIXME + # Dr.Best 09-04-2014 --> good solution? + # if eDVBLocalTimeHandler is updating the transponder time (negativ), the timewarp code in the orginal calcNextActivation() method is the reason why epgrefresh triggers all remaining refresh timers at once. + # I believe the timewarp code is not necessary here in the EPGRefreshTimer class, so I removed it. + # FIXME FIXME FIXME + + self.processActivation() + self.lastActivation = time() + + min = int(time()) + self.MaxWaitTime + + # calculate next activation point + timer_list = [ t for t in self.timer_list if not t.disabled ] + if timer_list: + w = timer_list[0].getNextActivation() + if w < min: + min = w + else: + print ("[EPGRefreshTimer] next real activation is %s" % (strftime("%c", localtime(w)))) + + self.setNextActivation(min) epgrefreshtimer = EPGRefreshTimer() -- 2.20.1