#105: Customize song metadata
-------------------------+--------------------------------------------------
Reporter: karye | Owner: admin
Type: Feature | Status: new
Priority: 1 | Milestone: 0.3.7
Component: Liquidsoap | Version: 0.3.6+svn
Resolution: | Keywords:
Mac: 1 | Other: 1
Freebsd: 1 | Linux: 1
-------------------------+--------------------------------------------------
Comment (by mrpingouin):
The $(if $(tag),"..","..") just checks that $(tag) is available and non-
empty. There is no such thing as $(tag)>0 in this system. This $(..)
syntax is not very nice and I don't plan to extend it. Rather, I take your
feature request as another call for a more general rewrite_metadata that
takes a function. I will do it eventually, possibly quite soon. In your
case, the idea would be to use a rewriting function like (I omit to check
for the availability of "album"):
{{{
fun (m) ->
if int_of_string(m["year"],default=0)>0 then
[ ("title",m["title"]), ("artist",m["artist"]^" - "^m["album"]^"
"^m["year"]) ]
else
[ ("title",m["title"]), ("artist",m["artist"]^" - "^m["album"]) ]
}}}
Having a function would give total flexibility without having to introduce
new concepts.
--
Ticket URL: <http://savonet.rastageeks.org/ticket/105#comment:1>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !