#250: Too much metadatas received with input.http
-------------------------+--------------------------------------------------
  Reporter:  Azrael      |       Owner:  admin    
      Type:  Bugs        |      Status:  new      
  Priority:  1           |   Milestone:  0.9.0    
 Component:  Liquidsoap  |     Version:  0.9.0+svn
Resolution:              |    Keywords:           
       Mac:  1           |       Linux:  1        
    Netbsd:  1           |       Other:  1        
   Freebsd:  1           |  
-------------------------+--------------------------------------------------
Comment (by toots):

 Hi !

 Thanks for the report.

 I don't get a detail: is it normal or not that you receive several
 metadata per second ?

 In case it is normal, then you can implement this check in the function
 that is called by the {{{on_metada}}}. The previous value can be recoed
 using {{{string.ref}}}. Here an extract of a similar code (radio-nova
 example):
 {{{
 # This string reference will be used to keep track
 # of previous metadata
 x = string.ref("")
 get_title = fst(x)
 set_title = snd(x)
 x = string.ref("")
 get_artist = fst(x)
 set_artist = snd(x)

 (...)

   old_title = get_title()
   old_artist = get_artist()
   if old_title != new_title or old_title != new_title then
     log("Got new metas: #{new_artist} -- #{new_title}")
     ignore(
       server.execute(
         'nova.insert artist="#{new_artist}",title="#{new_title}"'))
     set_title(new_title)
     set_artist(new_artist)
   else
     log("Keeping old metas")
   end
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/250#comment:1>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to