Udo,

That's perfect, thank you! It turns out the that last script I was using 
actually doesn't work - the stream dies after the first track with 
catchup and broken pipe errors. But the method you suggested greatly 
simplifies things and makes sure that all tracks get metadata without 
having to constantly ping a db. It also makes the script a lot simpler, 
obviously.

:-)

Damien

On 06/29/12 23:01, udo noll wrote:
> Audiodef Online:
>> def append_artist(m) =
>>           artist = m["artist"]
>>       real_uri = m["initial_uri"]
>> real_artist=get_process_output("/home/audiodef/radio/./get_artist.php
>> #{real_uri}")
>>           if artist == "" then
>>           [("artist","Synthetronica Radio: #{real_artist}")]
>>       else
>>           [("artist","Synthetronica Radio: #{artist}")]
>>       end
>>
>> Can anyone tell me if, for any reason, I should be doing things
>> differently?
> don't know if that fits your situation, didn't follow the discussion.
> but you could simply create a playlist with all your metadata from the
> database in advance, using the annotate protocol, e.g.
>
> annotate:my_title="title 1",my_artist="artist 1":/path/file1.mp3
> annotate:my_title="title 2",my_artist="artist 2":/path/file2.mp3
> ...
>
> and then in the LS script:
>
> playlist =
>      rewrite_metadata(
>          [("artist",'$(if $(my_artist),"$(my_artist)","$(artist)")'),
>          ("title", '$(if $(my_title),"$(my_title)","$(title)")')],
>          playlist)
>   
>
> udo
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>


-- 
My music: http://audiodef.com
Synthetronica: http://synthetronica.com
Male survivors of domestic violence: http://abusedmen.org


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to