Player.GoTo not working for pictures
#1
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?
Reply
#2
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.
Reply
#3
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!
Reply
#4
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.
Reply
#5
When right-clicking a photo, there is an option in XBMC called "Start slideshow here". Can this option be called from JSON-RPC ?
Reply
#6
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.
Reply
#7
Wink 
(2014-07-03, 13:20)Montellese Wrote: And you can still go back from that picture to the the picture before the one you started the slideshow at?
Yes, it works as expected. Hitting "next" and "previous" actually takes me to the next and previous of the selected picture.

(2014-07-03, 13:20)Montellese Wrote: 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.
Yes, I can already do that by calling "Player.Open" with a picture filepath, but because the playlist has only 1 item, I cannot do a "next" or "previous".

(2014-07-03, 13:20)Montellese Wrote: PS: "Picture playlist" and "slideshow" are the same thing.
Yes and no.
Actually there were 2 things I could do in XBMC with picture selection:
1. "Picture Playlist": When I click on a picture from a folder, XBMC creates a playlist with all the pictures from the folder, and it selects the picture I have chosen.
2. "Slideshow": When I right click on a picture and choose "Start slideshow here", XBMC does the same as above, except I have the option to start and pause the slideshow (whereas in the above example, I didn't have that option).

So, if one of these 2 options would be possible via JSON-RPC, it would be great! Big Grin
Reply
#8
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Player.GoTo not working for pictures0