Kodi Community Forum

Full Version: JSON-RPC - VideoLibrary.GetRecentlyAddedEpisodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Just curious if anyone could point me in the right direction here. I've been trying to workout how to retrieve the recently added TV Shows using VideoLibrary.GetRecentlyAddedEpisodes

{ "jsonrpc" : "2.0", "method": "VideoLibrary.GetRecentlyAddedEpisodes", "id": 1 }

That works fine, but only retrieves the episode name and not the actual TV Show or an id for the TV Show.

I've seen some examples where people are using the params with this call, but so far I haven't been able to nail down the syntax.

{ "jsonrpc" : "2.0", "method": "VideoLibrary.GetRecentlyAddedEpisodes", "params": { "fields": [ "title", "showtitle" ] }, "id": 1 }

I've tried all sorts of variations of the above with no success getting either parse error or too many parameters.
To answer your question I need to know what version of XBMC you are using (Dharma 10.0/10.1 or a "older" nightly build or a very recent (like a few days) nightly build).

If you got a very recent nightly build you should be able to run:
{ "jsonrpc": "2.0", "method": "VideoLibrary.GetRecentlyAddedEpisodes", "params": { "properties": [ "title", "showtitle", "tvshowid" ] }, "id": 1 }
Hey thanks for the response and yeah, should have mentioned I'm using it against the Eden nightlies.

Weird ... it was working just fine and I had to shutdown XBMC to do something and now when I run the command I get

{"error":{"code":-32602,"data":{"message":"Too many parameters","method":"VideoLibrary.GetRecentlyAddedEpisodes"},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

and I didn't update XBMC ... very strange.

Never mind ... I closed down XBMC, reopened it and tried again and this time the request worked fine. Part of being on the bleeding edge I guess.