]> www.vanbest.org Git - motioneye-debian/commitdiff
fixed boolean extra motion options
authorCalin Crisan <ccrisan@gmail.com>
Thu, 26 Nov 2015 18:54:47 +0000 (20:54 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Thu, 26 Nov 2015 18:54:47 +0000 (20:54 +0200)
motioneye/config.py

index d3e1b6926a772ed4806a79742527731f34823663..2d653fe4aefe4558762c762c829282dc73b1bb69 100644 (file)
@@ -1262,6 +1262,9 @@ def motion_camera_dict_to_ui(data):
     extra_options = []
     for name, value in data.iteritems():
         if name not in _KNOWN_MOTION_OPTIONS and not name.startswith('@'):
+            if isinstance(value, bool):
+                value = ['off', 'on'][value] # boolean values should be transferred as on/off
+
             extra_options.append((name, value))
 
     ui['extra_options'] = extra_options