Ok. I am trying to test it, but when including
radio = on_metadata(fun(m)->log(m), radio)
in my script I get a syntax error
(I do not yet find liquidsoap language very understandable)

At line 43, char 20:
   this value has type
     (?id:string, (([(string*string)])->unit), source)->source
   but it should be a subtype of
     (((string)->unit), source)->?A

At line 43, char 21-34:
   this value has type
     (string)->unit
   but it should be a subtype of
     ([(string*string)])->unit

At line 43, char 26:
   this value has type
     string
     (infered at line 43, char 34)
   but it should be a supertype of
     [(string*string)]


Here is the my script:

#p_something are .pls playlists
radio = fallback([ request.queue(id="request"),
                     switch([({ 0m-15m }, p_news),
                                      ({ 10m-13m }, p_weather),
                             ({ 13m-30m }, cooking_science),
                             ({ 30m-40m }, code_poker),
                             ({ 40m-0m }, french_bible_poems)
                                     ]), default
                     ])


# Rewrite metadata
radio = rewrite_metadata([("comment","THIS IS A COMMENT")],radio)

radio = on_metadata(fun(m)->log(m), radio)

# Output the stream in OGG
output.icecast.vorbis(
     samplerate=32000, quality=0.2, stereo=false,
     fallible=true,
     host="me",port=8000,password="hackme",
     nrj(radio))




On 03/20/2012 04:26 PM, Romain Beauxis wrote:
> Hi Andre!
>
> Le 20 mars 2012 04:23, andre castro<[email protected]>  a écrit :
>> Thanks David,
>>
>> It sort of...
>>
>> Because these are files over which I have no control (they live in
>> archive.org), they might or might not have good metadata.
>>
>> More essential to show during the stream (in a browser) rather than their
>> metadata will be to show their url in archive.org. That's why I want to be
>> able to have access to the current playing Title whithin a playlist
>>
>> So saying that my morning.pls is:
>>
>> [playlist]
>> numberofentries=2
>>
>> Title1=http://www.archive.org/details/DeadbeatByDice/
>>
>> File1=http://www.archive.org/download/DeadbeatByDice/05Deadbeat.ogg
>>
>> Title2=http://www.archive.org/details/SlipperyWhenWet/
>> File2=http://www.archive.org/download/SlipperyWhenWet/BillCosby.ogg
>>
>>
>> and currently File1 is being played; I would like to have its
>> Title(http://www.archive.org/details/DeadbeatByDice/) or
>> File(http://www.archive.org/download/DeadbeatByDice/05Deadbeat.ogg)
>> in a variable. So that this information could be written into the stream
>> metadata (the writing metadata part I am ok with)
>>
>> Is this impossible??
> Metadata received through on_metadata should include much more
> information than just mp3 id3 tags. If you start logging them as David
> explained above, you should be able to see if you can find what you
> need :-)
>
> Romain
>


-- 
          _
         (`  ).
         http://www.andrecastro.info/
       _(       '`.
   .=(`(      .   )     .--
  ((    (..__.:'-'   .+(   )
  `(       )          (   .  )
   ` __.:'             `-' '-

--..,___.--,--'-,---..-.--+--.,,-,,...


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to