diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-02-16 18:25:23 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-02-16 18:25:23 +0100 |
| commit | d58ca4cf34b7621aea4e2c1ff07bed6b2cd6b763 (patch) | |
| tree | f96b8eae81d7aa0c2d11eda8bcda1e4b87f96e78 /lib/python/Components/TimerSanityCheck.py | |
| parent | 4510fa62a33b31fec442fd0d77eb682d93ebf7e6 (diff) | |
| parent | fbaf2a5f2fa5236b09a4d14f059d99eace24f2d5 (diff) | |
| download | enigma2-d58ca4cf34b7621aea4e2c1ff07bed6b2cd6b763.tar.gz enigma2-d58ca4cf34b7621aea4e2c1ff07bed6b2cd6b763.zip | |
Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
Diffstat (limited to 'lib/python/Components/TimerSanityCheck.py')
| -rw-r--r-- | lib/python/Components/TimerSanityCheck.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py index cf02459d..cf505022 100644 --- a/lib/python/Components/TimerSanityCheck.py +++ b/lib/python/Components/TimerSanityCheck.py @@ -1,11 +1,12 @@ import NavigationInstance -from time import localtime +from time import localtime, mktime, gmtime from ServiceReference import ServiceReference from enigma import iServiceInformation, eServiceCenter, eServiceReference class TimerSanityCheck: def __init__(self, timerlist, newtimer=None): print "sanitycheck" + self.localtimediff = 25*3600 - mktime(gmtime(25*3600)) self.timerlist = timerlist self.newtimer = newtimer self.simultimer = [] @@ -70,6 +71,10 @@ class TimerSanityCheck: rflags = ((rflags & 0x7F)>> 3)|((rflags & 0x07)<<4) if rflags: begin = self.newtimer.begin % 86400 # map to first day + if (self.localtimediff > 0) and ((begin + self.localtimediff) > 86400): + rflags = ((rflags >> 1)& 0x3F)|((rflags << 6)& 0x40) + elif (self.localtimediff < 0) and (begin < self.localtimediff): + rflags = ((rflags << 1)& 0x7E)|((rflags >> 6)& 0x01) while rflags: # then arrange on the week if rflags & 1: self.rep_eventlist.append((begin, -1)) @@ -87,6 +92,10 @@ class TimerSanityCheck: rflags = timer.repeated rflags = ((rflags & 0x7F)>> 3)|((rflags & 0x07)<<4) begin = timer.begin % 86400 # map all to first day + if (self.localtimediff > 0) and ((begin + self.localtimediff) > 86400): + rflags = ((rflags >> 1)& 0x3F)|((rflags << 6)& 0x40) + elif (self.localtimediff < 0) and (begin < self.localtimediff): + rflags = ((rflags << 1)& 0x7E)|((rflags >> 6)& 0x01) while rflags: if rflags & 1: self.rep_eventlist.append((begin, idx)) |
