From: Calin Crisan <ccrisan@gmail.com>
Date: Thu, 26 Nov 2015 18:54:47 +0000 (+0200)
Subject: fixed boolean extra motion options
X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=b04b16128143feb93143b157a38b470ea8be0f20;p=motioneye-debian
fixed boolean extra motion options
---
diff --git a/motioneye/config.py b/motioneye/config.py
index d3e1b69..2d653fe 100644
--- a/motioneye/config.py
+++ b/motioneye/config.py
@@ -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