diff options
author | heqnx <root@heqnx.com> | 2025-07-06 14:57:39 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-06 14:57:39 +0300 |
commit | a064cbda2086b79b6cc04111cb308a6b2d770aa6 (patch) | |
tree | 9b2c6aa08775aaae76420f9ad8d6baaf728bbe24 /templates/srv/radio/radio.liq.j2 | |
parent | 3559ca8a720086f080286e887a29b6fa68810fa9 (diff) | |
download | ansible-icecast2-a064cbda2086b79b6cc04111cb308a6b2d770aa6.tar.gz ansible-icecast2-a064cbda2086b79b6cc04111cb308a6b2d770aa6.zip |
replaced ices2 which only supports vorbis, with liquidsoap + creation of title metadata; reorganized templates
Diffstat (limited to 'templates/srv/radio/radio.liq.j2')
-rw-r--r-- | templates/srv/radio/radio.liq.j2 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/srv/radio/radio.liq.j2 b/templates/srv/radio/radio.liq.j2 new file mode 100644 index 0000000..0a070fe --- /dev/null +++ b/templates/srv/radio/radio.liq.j2 @@ -0,0 +1,23 @@ +#!/usr/bin/liquidsoap + +#settings.init.allow_root := true +set("log.file.path", "{{ radio_music_dir }}/logs/radio.log") + +music = playlist("{{ radio_music_dir }}/playlist.txt") +music = mksafe(music) + +def append_branding(m) = + title = m["title"] + [("title", "#{title}")] +end + +music = map_metadata(append_branding, music) + +output.icecast( + %mp3(bitrate=128), + music, + host="localhost", + port=8000, + password="{{ random_password }}", + mount="/stream", +) |