]> www.vanbest.org Git - motioneye-debian/commitdiff
mmal: minor cosmetic changes
authorCalin Crisan <ccrisan@gmail.com>
Sun, 29 Oct 2017 13:11:55 +0000 (15:11 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 29 Oct 2017 13:11:55 +0000 (15:11 +0200)
motioneye/config.py
motioneye/handlers.py
motioneye/static/js/main.js
motioneye/utils.py

index f915a97679add8758168d293629abd230a9b3921..5100c95cdd063ee0d29197982f4d6637823253fd 100644 (file)
@@ -543,7 +543,7 @@ def add_camera(device_details):
     while camera_id in camera_ids:
         camera_id += 1
 
-    logging.info('adding new %(prt)s camera with id %(id)s...' % {'prt': proto, 'id': camera_id})
+    logging.info('adding new %(proto)s camera with id %(id)s...' % {'proto': proto, 'id': camera_id})
 
     # prepare a default camera config
     camera_config = {'@enabled': True}
index fb1c93e545b7eaabb17842bafab557342f40a95a..2622d5a68943928126d03135a9a8e187406b545e 100644 (file)
@@ -647,7 +647,7 @@ class ConfigHandler(BaseHandler):
                     configured_devices.add(data['videodevice'])
 
             cameras = [{'id': d[1], 'name': d[2]} for d in v4l2ctl.list_devices()
-                    if (d[0] not in configured_devices) and (d[1] not in configured_devices)]
+                       if (d[0] not in configured_devices) and (d[1] not in configured_devices)]
             
             self.finish_json({'cameras': cameras})
 
@@ -660,9 +660,10 @@ class ConfigHandler(BaseHandler):
 
             if "vc.ril.camera" not in configured_devices:
                 cameras = [{'id': "vc.ril.camera", 'name': "VideoCore Camera (vc.ril.camera)"}]
+
             else:
-                               cameras = []
-            
+                cameras = []
+
             self.finish_json({'cameras': cameras})
 
         else:  # assuming local motionEye camera listing
@@ -679,6 +680,7 @@ class ConfigHandler(BaseHandler):
                     self.finish_json({'cameras': cameras})
                     
             def on_response_builder(camera_id, local_config):
+
                 def on_response(remote_ui_config=None, error=None):
                     if error:
                         cameras.append({
index 3438c9c05dd8b179c677d7a063d7b3a154399baf..e11ff16682f8de796ae69d3113513ffce2ebe773 100644 (file)
@@ -3569,7 +3569,7 @@ function runAddCameraDialog() {
                 '<tr>' +
                     '<td class="dialog-item-label"><span class="dialog-item-label">Camera Type</span></td>' +
                     '<td class="dialog-item-value"><select class="styled" id="typeSelect">' +
-                        (hasLocalCamSupport ? '<option value="v4l2">Local Camera</option>' : '') +
+                        (hasLocalCamSupport ? '<option value="v4l2">Local V4L2 Camera</option>' : '') +
                         (hasLocalCamSupport ? '<option value="mmal">Local MMAL Camera</option>' : '') +
                         (hasNetCamSupport ? '<option value="netcam">Network Camera</option>' : '') +
                         '<option value="motioneye">Remote motionEye Camera</option>' +
@@ -3675,8 +3675,8 @@ function runAddCameraDialog() {
         else { /* assuming v4l2 */
             content.find('tr.v4l2').css('display', 'table-row');
             addCameraInfo.html(
-                    'Local cameras are camera devices that are connected directly to your motionEye system. ' +
-                    'These are usually USB webcams or board-specific cameras.');
+                    'Local V4L2 cameras are camera devices that are connected directly to your motionEye system, ' +
+                    'usually via USB.');
         }
         
         updateModalDialogPosition();
index 34f0dff4a1fa42efbd1160ea62719821ee4eb570..afab32c373c7ebabe207a4c085d73a0d0313b7cd 100644 (file)
@@ -347,6 +347,7 @@ def is_local_motion_camera(config):
     """Tells if a camera is managed by the local motion instance."""
     return bool(config.get('videodevice') or config.get('netcam_url') or config.get('mmalcam_name'))
 
+
 def is_remote_camera(config):
     """Tells if a camera is managed by a remote motionEye server."""
     return config.get('@proto') == 'motioneye'
@@ -356,10 +357,12 @@ def is_v4l2_camera(config):
     """Tells if a camera is a v4l2 device managed by the local motion instance."""
     return bool(config.get('videodevice'))
 
+
 def is_mmal_camera(config):
     '''Tells if a camera is mmal device managed by the local motion instance.'''
     return bool(config.get('mmalcam_name'))
 
+
 def is_net_camera(config):
     """Tells if a camera is a network camera managed by the local motion instance."""
     return bool(config.get('netcam_url'))