Hi,
I'm trying to interpolate a ref "" in the filename for output.filename:
output.file(%mp3,
"/mnt/wat/datafruits-#{current_dj}-%d-%m-%Y-%H:%M:%S.mp3",
live_dj,fallible=true)
which gets set in my auth function for input.harbor:
def dj_auth(user,password) =
u = get_user(user,password)
p = get_password(user,password)
#get the output of the php script
ret = get_process_lines("bundle exec ./dj_auth.rb #{u} #{p}")
#ret has now the value of the live client (dj1,dj2, or djx), or
"ERROR"/"unknown"
ret = list.hd(ret)
#return true to let the client transmit data, or false to tell
harbor to decline
if ret == "true" then
title_prefix := "LIVE NOW ♫✩ -- #{u} ✩♪"
current_dj := "#{u}"
true
else
false
end
end
live_dj =
input.harbor("datafruits",port=9000,auth=dj_auth,on_disconnect=on_disconnect)
But when I see the filename its simply this:
datafruits-ref("")-08-09-2013-20:08:45.mp3
I'm guessing the string is only interpolated at the beginning of the
script being run, or its interpolated before the dj_auth function is
run. Any ideas?
Also I noticed this in the docs for output.file:
(unlabeled) (string): Filename where to output the stream. Some
strftime conversion specifiers are available: %SMHdmY. You can also
use $(..) interpolation notation for metadata.
What does it mean by $(..), was that supposed to be #{..} ?
Thanks again,
--
-Tony Miller
github.com/mcfiredrill
@freedrull
freedrool.us
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users