Multiple playlists

Is it possible to use multiple playlists? More precisely, I need to change the playlist on a signal GPIO.

The schedule player package can almost do that. You can set up multiple playlist and set items within each playlist with a manual trigger. These triggers include keyboard events, xbox controller events, remote events (triggered through the device page) and GPIO triggers.

Once triggered, the usual playlist is interrupted and the triggered page is scheduled immediately. But unlike your request, once the triggered page finished, the configured playlist cycle resumes. So the GPIO trigger would only play a single page.

The code could be adapted to handle that case though. All that would be required would be that this function not only returns the first matching page but all pages with the GPIO trigger. Then setting the trigger on all pages of a playlist could schedule all of them.