RecordTimer.py: fix isInTimer for repeating timers .. thx to adenin
authorghost <andreas.monzner@multimedia-labs.de>
Sat, 16 May 2009 16:20:14 +0000 (18:20 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Sat, 16 May 2009 16:20:14 +0000 (18:20 +0200)
RecordTimer.py

index fd2da33c58b1ca4d491dc8166ba66f9bc0940242..e8b76e921aab631bc24aecf9111cda2b8b4b6d74 100644 (file)
@@ -649,7 +649,7 @@ class RecordTimer(timer.Timer):
                                                chktimecmp_end = chktimecmp + (duration / 60)
                                        time = localtime(x.begin)
                                        for y in (0, 1, 2, 3, 4, 5, 6):
-                                               if x.repeated & (2 ** y):
+                                               if x.repeated & (2 ** y) and (x.begin <= begin or begin <= x.begin <= end):
                                                        timecmp = y * 1440 + time.tm_hour * 60 + time.tm_min
                                                        if timecmp <= chktimecmp < (timecmp + ((x.end - x.begin) / 60)):
                                                                time_match = ((timecmp + ((x.end - x.begin) / 60)) - chktimecmp) * 60