2014-01-03, 17:23
Hi,
I have a problem similar as the one in this thread (with no responses) http://forum.xbmc.org/showthread.php?tid=174322 . However I have a few more details.
The call that gives inconsistencies is Player.GetProperties (with playerid changed to the good value according to the use-case) :
When I launch an album from my XBMC library or when I load a m3u file, the call returns the correct current position, from 0 to n.
However if I construct a playlist on the fly by making this sequence of calls :
Then the position returned from the call to GetProperties is always -1.
There is probably something I don't get, but what ? Is there something like two kinds of playlists, the "fixed" ones (first case) and the "temporary" ones (second case) ?
Is there a workaround to get the correct position while constructing playlists "on the fly" (they're not always playlists of music, they can be playlists of Youtube videos or other kind of contents, so a music only solution like constructing a m3u file would not work) ?
I tried this on XBMC 12.2, Mac and Linux (raspbmc).
Thanks, regards
--
Pierre-Rudolf Gerlach
I have a problem similar as the one in this thread (with no responses) http://forum.xbmc.org/showthread.php?tid=174322 . However I have a few more details.
The call that gives inconsistencies is Player.GetProperties (with playerid changed to the good value according to the use-case) :
Code:
{"jsonrpc":"2.0","method":"Player.GetProperties","params":{ "playerid": 0, "properties": ["position"]},"id":1}
When I launch an album from my XBMC library or when I load a m3u file, the call returns the correct current position, from 0 to n.
However if I construct a playlist on the fly by making this sequence of calls :
Code:
{ jsonrpc: '2.0', method: 'Playlist.Clear', params: { playlistid: 1 }, id: 1 }
{ jsonrpc: '2.0', method: 'Playlist.Add', params: { playlistid: 1, item: { file: '/tmp/test1.ogg' } }, id: 2 }
{ jsonrpc: '2.0', method: 'Playlist.Add', params: { playlistid: 1, item: { file: '/tmp/test2.ogg' } }, id: 3 }
{ jsonrpc: '2.0', method: 'Player.Open', params: { item: { playlistid: 1 } }, id: 4 }
Then the position returned from the call to GetProperties is always -1.
There is probably something I don't get, but what ? Is there something like two kinds of playlists, the "fixed" ones (first case) and the "temporary" ones (second case) ?
Is there a workaround to get the correct position while constructing playlists "on the fly" (they're not always playlists of music, they can be playlists of Youtube videos or other kind of contents, so a music only solution like constructing a m3u file would not work) ?
I tried this on XBMC 12.2, Mac and Linux (raspbmc).
Thanks, regards
--
Pierre-Rudolf Gerlach