# This function is called when
# a new metadata block is passed in
# the stream.
def apply_metadata(m) =
title = m["title"]
artist = m["artist"]
print("Now playing: #{title} by #{artist}")
end
s = on_metadata(apply_metadata,s)
def icy_update(v) =
# Parse the argument
l = string.split(separator=",",v)
def split(l,v) =
v = string.split(separator="=",v)
if list.length(v) >= 2 then
list.append(l,[(list.nth(v,0),list.nth(v,1))])
else
l
end
end
meta = list.fold(split,[],l)
# Update metadata
icy.update_metadata(mount="/mystream",password="hackme",
host="myserver.net",meta)
"Done !"
end
The tune-in app I wrote is basically a push http-get so I will test this weekend if it can modified to send data to icecast directly
vOISSES
It looks like you're new here. If you want to get involved, click one of these buttons!