Relay Now Playing data to icecast #2692
Unanswered
h4rrywilliams
asked this question in
Q&A
Replies: 1 comment
-
Hi, Most definitely. The documentation for the harbor HTTP support is here: https://www.liquidsoap.info/doc-2.1.2/harbor_http.html We have the Here's a quick adaptation of the script in the examples: def set_meta(~protocol,~data,~headers,uri) =
# Split uri of the form request?foo=bar&...
# into (request,[("foo","bar"),..])
x = url.split(uri)
# Filter out unusual metadata
meta = metadata.export(snd(x))
# Send the metadata. This could be done a in `thread.run` if
# taking too long.
icy.update_metadata(
host=..., port=..., user=...,
password=..., mount=...,
meta
)
# Return response
http.response(
protocol=protocol,
code=200,
headers=[("Content-Type","text/html")],
data="<html><body><b>#{ret}</b></body></html>"
)
end
harbor.http.register(port=7000,method="GET","/setmeta",set_meta) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm using liquid soap as an encoder for a radio station. I want to send now playing data from Myriad 5, our automation software, to our icecast server but I cannot do this from a different IP from the encoder!
Is there a way to have liquid soap take a HTTP request and send it to my different ice mount points?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions