Hi,

I did the test, actually it was quick. I compared the output of:
  liquidsoap -r
annotate:title=\"rien\",rien=\"title\":~/media/audio/Sex_Mob/Artie_Shaw.ogg
and:
  liquidsoap -r ~/media/audio/Sex_Mob/Artie_Shaw.ogg
I can see the new metadata field "rien" being added, but the field
"title" is not changed. This means that the file's metadata has the
priority.

So the solution with rewrite_metadata() is more promising. You have
problem because you need only the basename of the files. Here's a
solution ready to use, doing the on-the-fly removal as you want.
Instead of rewrite_metadata I used map_metadata() which is more
general. Unfortunately it's only available on SVN version:
  map_metadata(
    fun(m)->[("title",get_process_output("basename #{m[\"filename\"]}"))],
    playlist("~/media/audio"))

I was surprised by that, and I think Toots will be surprised too: this
code doesn't erase other metadata. If you want to mask the artist
field, add something for it in the list.

A+
-- 
David

PS: About XML playlist, you might have found a bug. If you have
noticed a strange, or clearly broken behaviour, please open a new
ticket on our Trac (http://savonet.rastageeks.org).

Reply via email to