Kodi Community Forum

Full Version: JSON Movies query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm querying movies using port 9090.

I have the following command:
Code:
{"jsonrpc": "2.0", "method":"VideoLibrary.GetMovies","id":0,"jsonrpc":"2.0","params":{"fields":["trailer","file","imdbnumber","mpaa","thumbnail","fanart","director","studio","genre","plot","runtime","playcount","rating","year","streamDetails","sorttitle","set"]}}

Which works great. It returns all the movies along with that data about them I want.

However, I'm wondering if there is a way to only query movies that are a certain genre for example. Is that possible or is it something to look forward to on Eden?
bump
From a quick scan of the trunk (i.e. pre-Eden code), the VideoLibrary.GetMovies JSON command ends up at:

https://github.com/xbmc/xbmc/blob/master...ry.cpp#L39

and this just receives all movies i.e. it does not specify a where clause. So it looks as if there is no way to specify a particular genre.

Since this is the trunk code I'm looking at, I doubt there are any plans to allow search criteria to be specified for the Eden release. Presumably the intention is that the JSON client would do the filtering itself. Allowing a where clause seems sensible to me, since the database can get quite big and it seems silly to return all movies when only a subset is required. However I don't work on the JSOn code. As usual, I imagine patches would be welcome, though note that the code is now frozen for the Eden beta so the changes wouldn't be added until v12.0.

JR
sorry to answer such an old thread but simple open questions bug me. Answer to OP is yes, in Frodo. Run JSONRPC.Introspect on your XBMC instance and you'll see a bunch of properties you can use to filter.

Unfortunately for me, none of them are IMDBid.