diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-10-20 20:57:34 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-10-20 20:57:34 +0000 |
| commit | 176633d2d609789050efb1d9567cccf038054c2b (patch) | |
| tree | 336a1248025510cd962b7723a114cdb5bb2ded82 /lib/python/Components/TimerSanityCheck.py | |
| parent | a6a3416db4ca8c181b4bca341a61ee31ac348732 (diff) | |
| download | enigma2-176633d2d609789050efb1d9567cccf038054c2b.tar.gz enigma2-176633d2d609789050efb1d9567cccf038054c2b.zip | |
gui timeroverlap fixes,
fix ordering of eventlist (end before start when time is equal)
Diffstat (limited to 'lib/python/Components/TimerSanityCheck.py')
| -rw-r--r-- | lib/python/Components/TimerSanityCheck.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py index a6fba85c..6e94df29 100644 --- a/lib/python/Components/TimerSanityCheck.py +++ b/lib/python/Components/TimerSanityCheck.py @@ -99,7 +99,7 @@ class TimerSanityCheck: ################################################################################ # journalize timer repeations - if len(self.nrep_eventlist): + if self.nrep_eventlist: interval_begin = min(self.nrep_eventlist)[0] interval_end = max(self.nrep_eventlist)[0] offset_0 = interval_begin - (interval_begin % 604800) @@ -140,9 +140,13 @@ class TimerSanityCheck: new_event_end = new_event_begin + (event_end - event_begin) self.nrep_eventlist.extend([(new_event_begin, event[1], self.bflag),(new_event_end, event[1], self.eflag)]) + def sort_func(x, y): + if x[0] == y[0]: + return cmp(y[2], x[2]) + return cmp(x[0], y[0]) ################################################################################ # order list chronological - self.nrep_eventlist.sort() + self.nrep_eventlist.sort(sort_func) ################################################################################## # detect overlapping timers and overlapping times |
