Posts: 16
Joined: Jul 2013
Reputation:
0
The function "Player.GoTo" does not seem to work when giving an integer "to" parameter, for playerid 2 (pictures).
I send: {"jsonrpc": "2.0", "method": "Player.GoTo", "params": {"playerid":2, "to": 2}, "id":"330"}
I receive: {"id":"330","error":{"message":"Failed to execute method.","code":-32100},"jsonrpc":"2.0"}
In all other cases, it works: other playerid's, or "to" parameter set to "next" or "previous".
I send: {"jsonrpc": "2.0", "method": "Player.GoTo", "params": {"playerid":0, "to": 2}, "id":"406"}
I receive: {"result":"OK","id":"406","jsonrpc":"2.0"}
Any thoughts?
Posts: 5,184
Joined: Jan 2009
Reputation:
131
That's because the slideshow only supports Player.GoTo with "next" and "previous".
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 16
Joined: Jul 2013
Reputation:
0
I've also tried to load a picture playlist (non-slideshow) and do a Player.GoTo(position) there, but it doesn't work there either.
The idea is that if I open a pic with Player.Open, I only get a playlist with 1 item, where I can't to a "next" and "previous", and when I load a picture playlist/slideshow, I cannot start them with the item I want.
Is there another way, to have both "next"/"previous" and integer position for pictures ?
Thanks!
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Unfortunately the functionality of the slideshow is very very very very limited right now in XBMC so this is not really a JSON-RPC limitation but rather a slideshow implementation limitation. IIRC one of the problems with jumping over pictures is that the slideshow always expects the image to be loaded next to be pre-cached so the usual logic keeps the last, current and next image pre-loaded and adjusts the pre-loaded items when you go to the next or previous picture. This will be completely broken when you jump to an arbitrary picture because you can't know where that might be so you can't pre-load it.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 16
Joined: Jul 2013
Reputation:
0
When right-clicking a photo, there is an option in XBMC called "Start slideshow here". Can this option be called from JSON-RPC ?
Posts: 5,184
Joined: Jan 2009
Reputation:
131
And you can still go back from that picture to the the picture before the one you started the slideshow at? Or does the slideshow start at the chosen picture and if you go back you end up with the last picture of the slideshow? If so you can do that as well with JSON-RPC by creating a picture playlist that only contains the pictures you want and start the player for that playlist.
PS: "Picture playlist" and "slideshow" are the same thing.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
I managed to adjust the code of Player.Open to at least support the "playlistid" and "position" combination for slideshows as well, see PR5123. That way you can first add all the pictures you want to view into a picture playlist (with Playlist.Add and/or Playlist.Insert) and then you can call Player.Open, provide the proper playlistid and the position you would like to start at.
Doing the same thing for the case where you provide a "path" parameter to Player.Open doesn't support this yet though. But better than nothing.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.