I’m using the musicbox 0.6 “dist” and have written a python script with various functionality, intended to map some physical buttons on a raspberry pi. One thing I’m working on is pod playback. I have managed to save position for the pods when switching source but when I’m trying to play them again, now from the last position, I have a small problem:
if i do this:
stop
clear playlist
add pod url
seek to position
the pod starts playing at pos 0:00. Supposedly because length of the pod mp3 isn’t fetched when added to playlist, or am I wrong?
if i do this, it works most of the time:
stop
clear playlist
add pod url
play
pause
sleep(5 seconds)
seek to position
The above doesn’t feel very right. I have tried both the jsonrpc way (server.core.playback.seek()) and os.system('mpc seek ') without success. Might there be better ways to do this?