Kodi Community Forum

Full Version: JSON - Player Resume Percentage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I'm writting an php script that stops the currently played song, and adds temporarily a certain mp3 to the playlist, fades volume out, fades in and start on the temp mp3.
When the temp mp3 has stopped with playing, I would like to resume the previous song with a fade in. (like an urgent message to customers)

Everything is working properly, except that i cannot restart the song at the point where it has been stopped.

I have all the correct variables with the nessesary values: position, playlistid, percentage, ... of the song what was playing.

My json looks like this:

Code:
http://192.168.0.40/jsonrpc?request={"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"playlistid":0,"position":3},"options":{"resume":18.023418426514}},"id":"1"}

18.023418426514 is the percentage I got from other json statements.
The result = OK, but it just start playing at 0:00

Does anyone has the same 'problem', or is it just by design and thus not possible?

Thanks in advance!
Wim
AFAIK music playback doesn't support resuming right now. It also has no bookmarks or (automatic) resume points but it has been requested quite a few times now (independent of JSON-RPC).
for now you should be able to use Player.Open then Player.Seek. Not ideal but should work (it does for videos).
Thank you both for the quick reply.
I will see if the Seek option works in a 'nice' way.