-
I am trying to insert custom metadata on metadata change event according to the tutorial example I found somewhere:
It works fine only for a few metadata tags like
However ID3v2.4 metadata tags set contains much more possible tags, so I am trying to understand why they are not allowed? Could you please help to find a way to provide more ID3v2 tags and values in the output Liquidsoap stream? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
Hi, @iSerganov . Yeah,
def metadata.export(m) =
exported_keys = settings.encoder.metadata.export()
list.assoc.filter((fun (k, (_:string)) -> list.mem(k, exported_keys)), m)
end You can insert whatever metadata you need. Just don't filter it with # here we don't use `metadata.export` — thus all metadata is allowed to pass through.
radio = insert_metadata(radio)
def set_metadata(request)
log.important("Inserting metadata: #{request.query}")
radio.insert_metadata(request.query)
http.response(data="Done.")
end
harbor.http.register.simple("/set_metadata", set_metadata, port=8007, method="GET")
meta = ref([])
radio.on_metadata(fun (m) -> meta := m)
def get_all_meta(_, response) =
response.json(meta())
end
harbor.http.register(port=8007, method="GET", "/metadata", get_all_meta) Now if we do something like [["WTF","3"],["artist","1"],["title","2"]] So basically you have to change |
Beta Was this translation helpful? Give feedback.
-
Not sure about it.
To modify metadata you have to go to I presume you want to add this Then it's much easier to annotate your playlists: radio = playlist(prefix='annotate:isrc="some dynamic code",EncodedBy="Nice Encoder":', "/music/music.m3u8")
meta = ref([])
radio.on_metadata(fun (m) -> meta := m)
def get_all_meta(_, response) =
response.json(meta())
end
harbor.http.register(port=8007, method="GET", "/metadata", get_all_meta) Then if needed you can add |
Beta Was this translation helpful? Give feedback.
-
It's still not clear to me what the goal is exactly. It's always better to do this beforehand and edit your songs with necessary tags.
|
Beta Was this translation helpful? Give feedback.
artist - title
values or DB of some sort. Then on every new track you can send currentartist - title
value to the API and in response getnew meta
(taken from an array) which you will then append: