Random from Playlist

I’ve been making some of my own plugins, mainly to hook up physical devices to Volumio. I’m having a lot of success with using socket.emit commands.

However I can’t figure out how, when starting a playlist to jump to a random place in the playlist.

I had tried using something like this:

  • setRandom to true
  • playing the playlist
  • next()

But the problem is (probably because I don’t understand the structure of the API enough) I think the next command isn’t being called at the right time, and isn’t jumping forward.

Any ideas on a simpler way of doing this?

I have another question on playing albums which I’ll put in a new thread.