Romain,

Ok so I have put the dynamic request in, and it points to a file.. ( a script 
)... But I put in the script the MP3 to play, and this was spammed so much that 
it kicked me out of SSH lol:

/home/nocturnal/track.txt: line 1: /home/nocturnal/tunes/_TODAY/10.today.mp3: 
cannot execute binary file


Your site examples are great, but none actually show the script I use, and how 
It should respond to my LIQ file to be a valid response. What do I name my 
script file? What do I put in it? Do I need to do a "Single", and echo back 
something? Can you help.

Thanks

Nathan



-----Original Message-----
From: Romain Beauxis [mailto:[email protected]] 
Sent: Wednesday, September 09, 2009 6:56 PM
To: Nathan Huebner
Cc: [email protected]
Subject: Re: [Savonet] #303: Large tracks take long to load

        Hi !

Le mercredi 9 septembre 2009 17:48:58, vous avez écrit :
> What I was hoping to see:
> 
> Start your liquidsoap with a playlist designed to fit x # of hours. Put in
>  a variable assuming that the first track is the track I want to play next
>  (obviously common sense in every situation of listing things in a fresh
>  manner of speaking), when the playlist has reloaded (and detected as a NEW
>  playlist ie:  ANYTHING changed... Size, Shape, Order, whatever I don't
>  think it matters)  ie: changes made to the playlist, but while starting at
>  the top of the playlist "after" the track that is playing has finished.
>  This would allow us to create day long playlists, and then updating the
>  new playlist in the evening, rather than do substring cutting, and
>  searching through a playlist file to see what has been playing.
> 
> Thanks!
> 
> Sorry if I sound like I'm complaining, this stuff is kind of difficult if
>  you just learned linux a week ago :)

No problem, you're much welcome ! However, please try to use the mail adress 
dedicated to user's support, which is: [email protected]

About your issue, my guess is that your needs will not fit the playlist design. 
The playlist in liquidsoap is really designed to be something flexible, where 
you put a bunch of songs to be played.

If you need a more precise control over what you play, the best would be to 
have liquidsoap call an external script. Such a source can be created using 
the request.dynamic operator.

Using this operator, each time liquidsoap needs to queue a new song, it will 
call any script that you provide it and use the returned value. That way, you 
can work out all your constraints outside of liquidsoap, using your prefered 
language etc.. All you need to do it to code a script that returns the new 
song to queue.

A usage example would be:
  # Request function
  def request () =
    request.create(audio=true,
        list.hd(get_process_lines("/path/to/script"))
  end

 # The dynamic source:
 s = request.dynamic(request)

The first part of the code is a function that calls the script 
"/path/to/script" and creates a new request using the the first line of its 
output.

The second part is a source that calls the function "request" in order to get 
its new songs.


Please don't hesitate to ask for more details if you need !

Romain


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to