Le Thursday 04 June 2009 07:18:22 Ramon Roche, vous avez écrit :
> Hey guys

        Hi !

> i am stuck in a project in which i need to use a Line in (got
> this working easily) but i need to get the Metadata going as well, i am
> wondering how to get the data into the application, i have read of
> telnet on liquidsoap but i am yet to find any good docs on using telnet
> with liquidsoap

In order to inject metadata into your source, you can use the insert_metadata 
operator.

You enable it by adding in your script:
  radio = insert_metadata(id="radio", radio)

That way, the radio source is redefined with the possibility to inject 
metadata. 

When running the script with the telnet server enabled:
  set("server.telnet", true)
you should be able to connect to the port 1234 on the localhost:
  telnet localhost 1234

This should open a console where you can type commands. For instance "help" 
will return the list of available commands. Also, some commands are self-
documented, so you can ask for their documentation.

In your case, you can then insert metadata, for instance:
  radio.insert title="foo",artist="bar"

For advanced usages, you can also execute this command within the script it 
self, using the server.execute operator:
  server.execute('radio.insert title="foo",artist="bar"')
This operator returns the strings corresponding to the output of the command. 
Usually you don't care about them and you ignore the output:
  ignore(server.execute('radio.insert title="foo",artist="bar"'))



Romain



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to