feat(playout): use jinja to configure liquidsoap outputs

This commit is contained in:
jo 2023-02-25 16:10:13 +01:00 committed by Kyle Robbertze
parent 85aa0174c3
commit 00b5c08647
10 changed files with 285 additions and 894 deletions

View file

@ -8,32 +8,9 @@ input_main_port = {{ config.stream.inputs.main.port }}
input_show_mount = {{ config.stream.inputs.show.mount | quote }}
input_show_port = {{ config.stream.inputs.show.port }}
{% for output in config.stream.outputs.merged -%}
# Output s{{ loop.index }}
s{{ loop.index }}_enable = {{ output.enabled | lower }}
s{{ loop.index }}_output = {{ output.kind | quote }}
s{{ loop.index }}_host = {{ output.host | quote }}
s{{ loop.index }}_port = {{ output.port }}
s{{ loop.index }}_mount = {{ output.mount | quote }}
s{{ loop.index }}_user = {{ output.source_user | quote }}
s{{ loop.index }}_pass = {{ output.source_password | quote }}
s{{ loop.index }}_channels = {{ output.audio.channels.value | quote }}
s{{ loop.index }}_type = {{ output.audio.format.value | quote }}
s{{ loop.index }}_bitrate = {{ output.audio.bitrate }}
s{{ loop.index }}_name = {{ (output.name or '') | quote }}
s{{ loop.index }}_description = {{ (output.description or '') | quote }}
s{{ loop.index }}_genre = {{ (output.genre or '') | quote }}
s{{ loop.index }}_url = {{ (output.website or '') | quote }}
{% endfor -%}
# Outputs
icecast_vorbis_metadata = {{ icecast_vorbis_metadata | lower }}
# System output
output_sound_device = {{ config.stream.outputs.system[0].enabled | lower }}
output_sound_device_type = {{ config.stream.outputs.system[0].kind.value | quote }}
# Settings
auth_path = {{ paths.auth_filepath | quote }}
@ -56,3 +33,7 @@ message_format = interactive.string("message_format", {{ preferences.message_for
input_fade_transition = interactive.float("input_fade_transition", {{ preferences.input_fade_transition }})
%include "{{ paths.lib_filepath }}"
{% include "outputs.liq.j2" %}
gateway("started")