On Wed, 27 Jan 2010 22:52:51 +0700, Max Arnold <lwa...@gmail.com> wrote:
> How I'm supposed to detect when one playlist is finished and it is time
to
> load next one?
> Tracks in playlist are played in random order (with looping disabled)
and
> when mpd finishes
> it stops. My script immediately notices this, clears old playlist and
> queues new.

Don't play them in random order. Randomize the playlist into a temporary
file before giving it to MPD. Or you could use the shuffle command to make
MPD randomize the order. Then your script should be able to tell when the
last track is being played. At that point you can use the crop command to
remove all the previous tracks from the playlist and do whatever you want
to do next.

> Also I have scheduled playlists. At defined time my script does fadeout,
> remembers current
> position, clears playlist, optionally plays short transition jingle and
> launches scheduled
> playlist. When finished, it restores old playlist and track position
with
> fadein effect.

Don't clear the playlist, crop it so just one track remains then add in
the jingles etc..

Hope this helps.

Cheers,
Tim.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to