def nowpl(m) musica = '#{m["artist"]} - #{m["title"]}' system("/home/radio/scripts/nowplaying #{quote(musica)}") end radio = on_metadata(nowpl,radio)
def my_request_function() = # Get the first line of my external process log = log(label="rotator") log("Getting song") result = list.hd( get_process_lines("/home/taras/ls/rotator.pl")) log("Got answer: #{result}") # Create and return a request using this result request.create(result) end myplaylist = request.dynamic(my_request_function)
myplaylist = request.dynamic({request.create("bar:foo", indicators=get_process_lines("/home/taras/ls/rotator.pl"))})