You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
893 B
34 lines
893 B
#!/usr/bin/liquidsoap
|
|
|
|
settings.harbor.bind_addrs.set(["0.0.0.0"])
|
|
enable_replaygain_metadata()
|
|
|
|
def print_meta(data)
|
|
artist = data["artist"]
|
|
title = data["title"]
|
|
|
|
meta = json()
|
|
meta.add("artist", artist)
|
|
meta.add("title", title)
|
|
|
|
http.post(data=meta.stringify(), headers=[("Content-Type", "application/json; charset=UTF-8")], "metadata:4000")
|
|
()
|
|
end
|
|
|
|
security = synth.all.sine(id="sine")
|
|
main_air_playlist = playlist("/music/main_air.pls")
|
|
general_playlist = replaygain(random([main_air_playlist]))
|
|
general_stream = normalize(crossfade(general_playlist))
|
|
live_stream = input.harbor("iceberg-live", port=6000, user="djiceberg", password="hackme")
|
|
|
|
radio = fallback(track_sensitive = false, [live_stream, general_stream, security])
|
|
|
|
radio.on_metadata(print_meta)
|
|
|
|
output.icecast(%mp3,
|
|
host = "icecast",
|
|
port = 8000,
|
|
password = "hackme",
|
|
mount = "iceberg.ogg",
|
|
radio)
|