2011/9/17 pranza <[email protected]>:
> Hello Romain!

Hi!

> I've been very happy with Liquidsoap - it runs trouble-free!

Excellent news!

> The only trouble is writing config - I only can manage to accomplish
> something, if I find the example on the web...

Yeah, learning curve is steep at the beginning..

> This time i need to append some metadata (adding dj name before track name).
> I used to do it like this, but this way the real artist name is lost:
> quartz=rewrite_metadata([("artist","quartz presents")],quartz)
> How could I append words "quartz presents" before actual artist name? Could
> you give me an exact example of how to write it?

Something on these lines should do:
def update_metadata(m) =
  [("artist", "quartz presents")]
end

quartz = map_metadata(update_metadata, quartz)

By default, map_metadata only updates metadata. Thus, in the above, we
only have to return the field we want to change.

Also, had you wanted to append some string to the artist, you would
have done for instance:
def update_metadata(m) =
  artist = m["artist"]
  [("artist", "quartz presents: #{artist}")]
end

Good luck with your scripts!
Romain

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to