else:
remote_ui_config['id'] = camera_id
+
if not remote_ui_config['enabled'] and local_config['@enabled']:
# if a remote camera is disabled, make sure it's disabled locally as well
local_config['@enabled'] = False
# if a remote camera is locally disabled, make sure the remote config says the same thing
remote_ui_config['enabled'] = False
+ for key, value in local_config.items():
+ remote_ui_config[key.replace('@', '')] = value
+
cameras.append(remote_ui_config)
check_finished()
return;
}
- var instance = config.host || '';
- if (config.port) {
- instance += ':' + config.port;
+ var instance;
+ if (config.proto == 'http' || config.proto == 'v4l2') {
+ instance = '';
+ }
+ else { /* motioneye */
+ instance = config.host || '';
+ if (config.port) {
+ instance += ':' + config.port;
+ }
}
affectedInstances[instance] = true;
var cameraIdsByInstance = {};
$('div.camera-frame').each(function () {
- var instance = this.config.host || '';
- if (this.config.port) {
- instance += ':' + this.config.port;
+ var instance;
+ if (this.config.proto == 'http' || this.config.proto == 'v4l2') {
+ instance = '';
+ }
+ else { /* motioneye */
+ instance = this.config.host || '';
+ if (this.config.port) {
+ instance += ':' + this.config.port;
+ }
}
(cameraIdsByInstance[instance] = cameraIdsByInstance[instance] || []).push(this.config.id);