i’ve setup a headless musicbox with RFID and GPIO buttons support for my kids.
Swiping a RFID card starts playback of a local m3u playlist.
The GPIO button offer previous/next track and play/pause toggle functionality.
Anyhow it seems as if my code is too buggy. So when the last track of the playlist is played and I press “next track”, the whole system seems to crash and does not recover. although I can restart playback on the webfrontend.
As I would like to improve the code, the big question is:
- is there any functionality to get the lenght or number of tracks in die playlist (python) ?
- is there any functionality to get the tracknumber (within a playlist) of the currently playing track?