Hi all ! Le jeudi 28 janvier 2010 11:42:38, Jean-Francois Mauguit a écrit : > Thanks > > On 28 Jan 2010, at 18:16, David Baelde wrote: > > On Thu, Jan 28, 2010 at 10:37 AM, Jean-Francois Mauguit > > > > <j...@radionomy.com> wrote: > >> What are the other meta available in liquidsoap : album ? other ones ? > > > > Off the top of my head, there's "song". Liquidsoap does not have any > > limitation on what you can get, it only depends on the input source. > > You can print all metadata using on_metadata() handlers. And (this is > > probably already your plan) use map_metadata() to transform the > > incoming metadata to an uniform setup, erasing the dependency on the > > source client.
Just a complement to make this perhaps more clear. The problem is that the initial protocol for source clients, shoutcast, only proposed a single metadata tag, named "song". Later, this was extended with title, album and artist (and any other I believe). Hence, some clients only send a metadata labelled "song" with value "'title - artist". Also, more generally, the set of metadata that liquidsoap has depends on what the source client sends... > I tried to implement that, it sounds working (no error) but it was already > the case with my software :-) > > So I did > > def rewrite_metadata(l,~insert_missing=true,live) > def map(m) > def apply(x) > label = fst(x) > meta = snd(x) > if list.mem_assoc(label,l) then > pattern = l[label] > (label,pattern % m) > else > (label,meta) > end > end > m = list.map(apply,m) > def add(m,x) > label = fst(x) > pattern = snd(x) > if not list.mem_assoc(label,m) then > list.append(m,[(label,pattern % m)]) > else > m > end > end > list.fold(add,m,l) > end > map_metadata(map,insert_missing=insert_missing,live) > end > > > live = on_metadata(fun (rewrite_metadata) -> system("curl > http://url.com/live.php?string=^quote(meta["title"])^"£"^quote(meta["artis > t"])^"£"^quote(meta["duration"])^" &"),live) > > Do you think it will do the trick ? I don't think this script is correct :-) What do you want to do exactly ? ;-) Romain ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users