# still images
'output_pictures': False,
'snapshot_interval': 0,
- 'picture_filename': ui['image_file_name'],
- 'snapshot_filename': ui['image_file_name'],
+ 'picture_filename': '',
+ 'snapshot_filename': '',
'quality': max(1, int(ui['image_quality'])),
'@preserve_pictures': int(ui['preserve_pictures']),
'@manual_snapshots': ui['manual_snapshots'],
data['text_double'] = True
if ui['still_images']:
+ data['picture_filename'] = ui['image_file_name']
+ data['snapshot_filename'] = ui['image_file_name']
+
capture_mode = ui['capture_mode']
if capture_mode == 'motion-triggered':
data['output_pictures'] = True
data['output_pictures'] = True
data['emulate_motion'] = True
+ elif capture_mode == 'manual':
+ data['output_pictures'] = False
+ data['emulate_motion'] = False
+
if ui['movies']:
data['ffmpeg_output_movies'] = True
recording_mode = ui['recording_mode']
snapshot_interval = data['snapshot_interval']
snapshot_filename = data['snapshot_filename']
- ui['still_images'] = (((emulate_motion or output_pictures) and picture_filename) or
- (snapshot_interval and snapshot_filename))
+ ui['still_images'] = bool(snapshot_filename) or bool(picture_filename)
if emulate_motion:
ui['capture_mode'] = 'all-frames'
if picture_filename:
ui['image_file_name'] = picture_filename
+ else: # assuming manual
+ ui['capture_mode'] = 'manual'
+ if snapshot_filename:
+ ui['image_file_name'] = snapshot_filename
+
if data['ffmpeg_output_movies']:
ui['movies'] = True
if preserve_media == 0:
continue # preserve forever
- still_images_enabled = bool(
- ((camera_config['emulate_motion'] or camera_config['output_pictures']) and camera_config['picture_filename']) or
- (camera_config['snapshot_interval'] and camera_config['snapshot_filename']))
-
- movies_enabled = camera_config['ffmpeg_output_movies']
+ still_images_enabled = bool(camera_config['picture_filename']) or bool(camera_config['snapshot_filename'])
+ movies_enabled = bool(camera_config['ffmpeg_output_movies'])
if media_type == 'picture' and not still_images_enabled:
continue # only cleanup pictures for cameras with still images enabled
});
/* capture mode and recording mode are not completely independent:
- * all frames capture mode implies continuous recording (and vice-versa) */
+ * all-frames capture mode implies continuous recording (and vice-versa) */
$('#captureModeSelect').change(function (val) {
if ($('#captureModeSelect').val() == 'all-frames') {
$('#recordingModeSelect').val('continuous');
<option value="motion-triggered">Motion Triggered</option>
<option value="interval-snapshots">Interval Snapshots</option>
<option value="all-frames">All Frames</option>
+ <option value="manual">Manual</option>
</select>
</td>
- <td><span class="help-mark" title="sets the image capture mode: Motion Triggered = an image captured whenever motion is detected, Interval Snapshots = an image captured every x seconds, All Frames = saves each frame to an image file">?</span></td>
+ <td><span class="help-mark" title="sets the image capture mode:
+ Motion Triggered = an image captured whenever motion is detected,
+ Interval Snapshots = an image captured every x seconds,
+ All Frames = saves each frame to an image file,
+ Manual = manual snapshots using snapshot button">?</span></td>
</tr>
<tr class="settings-item advanced-setting" min="1" max="86400" required="true" depends="captureMode=interval-snapshots">
<td class="settings-item-label"><span class="settings-item-label">Snapshot Interval</span></td>