]> www.vanbest.org Git - motioneye-debian/commitdiff
still images: add "motion-triggered (one picture)" capture mode
authorCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 19:50:21 +0000 (22:50 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 19:50:21 +0000 (22:50 +0300)
motioneye/config.py
motioneye/templates/main.html

index f3b1105fd4c965d7b1ecfba3d9f57ba9d144c1cb..56b1643ccf716e985f2d51e8a3195b074c8674c2 100644 (file)
@@ -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
 
index 46a5af5e679abc4a8cde151ef3779455d721ff6e..e860945045b89060b26812fa64c58f1e0d0f25d1 100644 (file)
                         <td class="settings-item-value">
                             <select class="styled still-images camera-config" id="captureModeSelect">
                                 <option value="motion-triggered">Motion Triggered</option>
+                                <option value="motion-triggered-one">Motion Triggered (One Picture)</option>
                                 <option value="interval-snapshots">Interval Snapshots</option>
                                 <option value="all-frames">All Frames</option>
                                 <option value="manual">Manual</option>
                         <td><span class="help-mark" title="sets the number of days after which the pictures will be deleted automatically">?</span></td>
                     </tr>
                     <tr class="settings-item advanced-setting">
-                        <td class="settings-item-label"><span class="settings-item-label">Manual Snapshots</span></td>
+                        <td class="settings-item-label"><span class="settings-item-label">Enable Manual Snapshots</span></td>
                         <td class="settings-item-value"><input type="checkbox" class="styled still-images camera-config" id="manualSnapshotsSwitch"></td>
                         <td><span class="help-mark" title="when this is enabled, a button on the camera frame will allow you to manually take snapshots">?</span></td>
                     </tr>