]> www.vanbest.org Git - motioneye-debian/commitdiff
motion detection is now left untouched when working schedule is disabled
authorCalin Crisan <ccrisan@gmail.com>
Mon, 25 Aug 2014 17:25:17 +0000 (20:25 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Mon, 25 Aug 2014 17:25:17 +0000 (20:25 +0300)
src/wsswitch.py

index 37101723a3f1fa75f0074080f9dabc76da991e46..ffb1d173013abd617c877176db1aa5a51ebbc39a 100644 (file)
@@ -87,8 +87,8 @@ def _check_ws():
         working_schedule_type = camera_config.get('@working_schedule_type') or 'outside'
         
         must_be_enabled = False
-        if not working_schedule: # working schedule disabled, motion detection always on
-            must_be_enabled = True
+        if not working_schedule: # working schedule disabled, motion detection left untouched
+            continue
         
         else:
             now_during = _during_working_schedule(now, working_schedule)
@@ -102,7 +102,7 @@ def _check_ws():
             
             motionctl.set_motion_detection(camera_id, False)
 
-        elif not  currently_enabled and must_be_enabled:
+        elif not currently_enabled and must_be_enabled:
             logging.debug('must enable motion detection for camera with id %(id)s (%(what)s working schedule)' % {
                     'id': camera_id,
                     'what': working_schedule_type})