]> www.vanbest.org Git - motioneye-debian/commitdiff
fixed motion running setup mode
authorCalin Crisan <ccrisan@gmail.com>
Sun, 4 Oct 2015 16:08:39 +0000 (19:08 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 4 Oct 2015 16:57:07 +0000 (19:57 +0300)
motioneye/config.py
motioneye/motionctl.py
motioneye/static/js/main.js

index e8c069002ccf4c0fabe61346c1db97dae89aeed9..a050da26ddfd13e62169a616a986382eada056b6 100644 (file)
@@ -817,7 +817,7 @@ def motion_camera_ui_to_dict(ui, old_config=None):
         data['ffmpeg_output_movies'] = True
         recording_mode = ui['recording_mode']
         if recording_mode == 'motion-triggered':
-            data['emulate_motion'] = False  
+            data['emulate_motion'] = False
 
         elif recording_mode == 'continuous':
             data['emulate_motion'] = True
index 7cdffe1abcf6cb8550163693631cadbb63902218..bd79cbc9d867c3dc3be2429e5ddb2424ba4ca4aa 100644 (file)
@@ -109,9 +109,9 @@ def start(deferred=False):
     motion_pid_path = os.path.join(settings.RUN_PATH, 'motion.pid')
     
     args = [program,
-            '-c', motion_config_path,
             '-n',
-            '-d']
+            '-d',
+            '-c', motion_config_path]
     
     if settings.LOG_LEVEL == logging.DEBUG:
         args.append('9')
index 540f25b48b6e941e849e5309219ec958bf3f444e..532787d27830be45c60e2f2a400d543886b44e75 100644 (file)
@@ -635,6 +635,8 @@ function initUI() {
         });
     });
     
+    /* various change handlers */
+    
     $('#storageDeviceSelect').change(function () {
         $('#rootDirectoryEntry').val('/');
     });
@@ -649,29 +651,6 @@ function initUI() {
         }
     });
     
-    /* fetch & push handlers */
-    $('#cameraSelect').focus(function () {
-        /* remember the previously selected index */
-        this._prevSelectedIndex = this.selectedIndex;
-    
-    }).change(function () {
-        if ($('#cameraSelect').val() === 'add') {
-            runAddCameraDialog();
-            this.selectedIndex = this._prevSelectedIndex;
-        }
-        else {
-            this._prevSelectedIndex = this.selectedIndex;
-            beginProgress([$(this).val()]);
-            fetchCurrentCameraConfig(endProgress);
-        }
-    });
-    $('input.main-config, select.main-config, textarea.main-config').change(function () {
-        pushMainConfig($(this).parents('tr:eq(0)').attr('reboot') == 'true');
-    });
-    $('input.camera-config, select.camera-config, textarea.camera-config').change(function () {
-        pushCameraConfig($(this).parents('tr:eq(0)').attr('reboot') == 'true');
-    });
-    
     /* streaming framerate must be >= device framerate */
     $('#framerateSlider').change(function () {
         var value = Number($('#framerateSlider').val());
@@ -709,6 +688,29 @@ function initUI() {
         updateConfigUI();
     });
     
+    /* fetch & push handlers */
+    $('#cameraSelect').focus(function () {
+        /* remember the previously selected index */
+        this._prevSelectedIndex = this.selectedIndex;
+    
+    }).change(function () {
+        if ($('#cameraSelect').val() === 'add') {
+            runAddCameraDialog();
+            this.selectedIndex = this._prevSelectedIndex;
+        }
+        else {
+            this._prevSelectedIndex = this.selectedIndex;
+            beginProgress([$(this).val()]);
+            fetchCurrentCameraConfig(endProgress);
+        }
+    });
+    $('input.main-config, select.main-config, textarea.main-config').change(function () {
+        pushMainConfig($(this).parents('tr:eq(0)').attr('reboot') == 'true');
+    });
+    $('input.camera-config, select.camera-config, textarea.camera-config').change(function () {
+        pushCameraConfig($(this).parents('tr:eq(0)').attr('reboot') == 'true');
+    });
+    
     /* preview controls */
     $('#brightnessSlider').change(function () {pushPreview('brightness');});
     $('#contrastSlider').change(function () {pushPreview('contrast');});