[icecast] how to modify ices source?

Brendan Cully
2004-08-06T14:22:32Z

On Wednesday, 01 August 2001 at 16:37, Robin P. Blanchard
wrote:
> > assuming otto can execute an arbitrary shell command whenever the
> > track plays (I assume it can call whatever mp3 decoder you want), you
> > can
> > a) have a script that does something like
> > echo $1 > /path/to/playlist.txt
> > Then ices will reload the playlist file (size: one entry) at the end
> > of the track.
> >
> > b) do
> > mkfifo ices.fifo
> > echo ices.fifo > playlist.txt
> > run ices,
> > and have otto do
> > cat $1 > ices.fifo
> > instead of calling its mp3 decoder.
>
>
> *otto*'s (not ices) :) problem is that the playlist is dynamic and is
> written after a track is played. while a track is playing you users
> can submit/delete requests or it's little daemon will randomly select
things.
> once a track is completed the top entry of that dynamic playlist is written
> as a file. otto only knows when a track has finished playing by it's
spawned
> app (in this case, ices) exiting. hence all of this debate.

In that case option b should work fine. otto can call
cat $1 > ices.fifo
which will exit when the track has finished. Then ices will close and
reopen ices.fifo and wait for the next track.

Problem solved?