Posts: 35
Joined: Apr 2009
Reputation:
2
I'm trying to figure out how to get the xbmc movie id from the json api.
I haven't done much with json rpc before but I have the following so far:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "items": {"imdbnumber": "tt1232829"},"id": "1"}
This seems to be retrieving all the movies instead of ones that match by imdbnumber, is there something I'm doing wrong?
Posts: 5,184
Joined: Jan 2009
Reputation:
131
What version of XBMC are you using? Considering the request you posted and the statement that it worked leads me to guess that you use Dharma (10.0)? If you want to use JSON-RPC you really should update to Eden (11.0).
Concerning your specific question for only retrieving the movie with a specific imdbnumber, this is not possible right now (neither in Dharma nor in Eden). JSON-RPC does not yet have a filtering functionality for these calls which let you specify certain conditions an item has to meet. But this will be added in the future (probably as part of my GSoC project).
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: 35
Joined: Apr 2009
Reputation:
2
im using a nightly of frodo, hope to see that functionality added in the future.
What exactly is your GSoC project aimed at, any links, im curious to read up
Posts: 6
Joined: Aug 2013
Reputation:
0
2013-08-09, 22:01
(This post was last modified: 2013-08-10, 22:41 by bdam.)
So it would seem that filtering was added into Frodo but if I understand correctly this is still not possible to do directly. That is to say, there is no way to return the movieid for an item in the movie table given the IMDB id using a single JSON call. The only option is to use VideoLibrary.GetMovies to get all of the movies (or some filtered subset) and then cycle through them to find the one you want.