From: Calin Crisan Date: Sat, 5 Aug 2017 19:50:21 +0000 (+0300) Subject: still images: add "motion-triggered (one picture)" capture mode X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=252fe4f214140d3d84baa84b6af2ad3507e65d85;p=motioneye-debian still images: add "motion-triggered (one picture)" capture mode --- diff --git a/motioneye/config.py b/motioneye/config.py index f3b1105..56b1643 100644 --- a/motioneye/config.py +++ b/motioneye/config.py @@ -947,6 +947,9 @@ def motion_camera_ui_to_dict(ui, old_config=None): if capture_mode == 'motion-triggered': data['output_pictures'] = True + elif capture_mode == 'motion-triggered-one': + data['output_pictures'] = 'best' + elif capture_mode == 'interval-snapshots': data['snapshot_interval'] = int(ui['snapshot_interval']) @@ -1361,7 +1364,12 @@ def motion_camera_dict_to_ui(data): ui['image_file_name'] = snapshot_filename elif output_pictures: - ui['capture_mode'] = 'motion-triggered' + if output_pictures == 'best': + ui['capture_mode'] = 'motion-triggered-one' + + else: + ui['capture_mode'] = 'motion-triggered' + if picture_filename: ui['image_file_name'] = picture_filename diff --git a/motioneye/templates/main.html b/motioneye/templates/main.html index 46a5af5..e860945 100644 --- a/motioneye/templates/main.html +++ b/motioneye/templates/main.html @@ -691,6 +691,7 @@ ?