Hi all,

Happy liquidsoap user here, thank you for a wonderful system!

I'm trying out upgrading from 1.x to 2.x and am running into a problem with a 
call to on_track in my old script.

Under liquidsoap 2.0.5 running my script results in:

> At sparetire.liq, line 19, char 8-17:
> Error 4: Undefined variable on_track

Removing the call to on_track allows the script to run. I'm using it to pass 
the metadata from the most recently played track to a python script which 
relays it elsewhere for display on a website.

I looked through the documentation and upgrade notes and couldn't seem to find 
info about this, my apologies if it's already documented somewhere!

My complete script looks like (with some things removed):

> #!/usr/bin/liquidsoap
> 
> set('encoder.encoder.export', ['artist', 'title', 'album', 'composer', 
> 'comment'])
> set('log.file.path', '')
> set('log.stdout', false)
> set('harbor.bind_addr', '127.0.0.1')
> 
> url = '
> streamuser = ''
> streampass = ''
> 
> sparetirerandom = nrj(playlist('playlist.m3u', mode='normal', 
> reload_mode='watch'))
> radio = mksafe(sparetirerandom)
> 
> def post_metadata(m) = 
>     system("/usr/bin/python3 sparetire_info.py "^quote(m['artist'])^" 
> "^quote(m['title'])^" "^quote(m['album'])^" "^quote(m['composer'])^" 
> "^quote(m['comment']))
> end
> 
> radio = on_track(post_metadata(), radio)
> 
> output.icecast(%mp3(bitrate=256, samplerate=44100, internal_quality=0, 
> id3v2=true), radio, 
> host='localhost', port=8000, user=streamuser, password=streampass, 
> description='SPARETIRE radio', url=url, genre='Freeform', 
> mount='sparetire', name='SPARETIRE radio')

Is there another way I can accomplish passing metadata to my python script? 
Thank you!

Erik
 <http://radio.af:8000/admin/>
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to