20 lines
No EOL
557 B
Django/Jinja
20 lines
No EOL
557 B
Django/Jinja
{% if motion_config %}{% for key, value in motion_config.items() %}
|
|
{% if key != 'cameras' and key != "camera" %}{{ key }} {{ value }}{% endif %}
|
|
|
|
{% endfor %}{% endif %}
|
|
|
|
{% if motion_config['cameras']|length < 2 %}
|
|
# Only camera
|
|
{% for key, value in motion_config['cameras'][0].items() %}
|
|
{% if value != "" %}
|
|
{{ key }} {{ value }}
|
|
{% else %}
|
|
# {{ key }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
# End of only camera
|
|
{% else %}
|
|
{% for camera in motion_config['cameras'] %}
|
|
camera {{ motion_config['camera_dir'] }}/{{ camera['camera_name'] }}.conf
|
|
{% endfor %}
|
|
{% endif %} |