I have a function that calls a shell script and generates the next song to 
stream...

def my_request_function() =
  # Get the first line of my external process
  result = list.hd(get_process_lines("./next_song.sh"))
  log("Next song "^result)
  # Create and return a request using this result
  request.create(result)
end

# Create the sources
plc = request.dynamic(my_request_function)

I want to re-use this for multiple streams that have totally different 
playlists.  But to do this, I need to be able to pass parameters into the 
function.  I need to be able to do something like this...

def my_request_function(playlistFile) =
  # Get the first line of my external process
  result = list.hd(get_process_lines("./next_song.sh "^ playlistFile))
  log("Next song "^result)
  # Create and return a request using this result
  request.create(result)
end

Is this possible at all?  Or will I have to wastefully duplicate the function 
for each different playlist?

Thanx,
/Mark
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to