XMMS-Ruby and M3U

Mar 22, 2004

I wrote this little snippet of code in response to an email, and I thought it might be useful for other people.

Basically, I'm trying to write some code that will connect to a running
XMMS session, grab the playlist and write out a .pls or a .m3u file.
Unfortunately, while XMMS can do this in a single operation, their API
doesn't seem to have a simple hook to do this.

Unfortunately, there's nothing in the remote API that lets you do that
in a single call. But it should be pretty easy to write; just iterate
over the list and print out the necessary lines for each entry.
Something like this: