Kodi Community Forum

Full Version: What does this function do/return??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
_json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1}' %(_item['file']))

it does not match the signature here:
http://mirrors.xbmc.org/docs/python-docs.../xbmc.html

What's that on the end %(_item['file']) ?
% (_item['file']) is substituted for the "%s" placeholder which follows "directory":

_item["file"] is a variable in Python, and given the context of this call it's going to be a directory path.
Ok I get it.
Its the variable to fill the parameter in the string.
Yep.
There is another call similar to the one above but it specifies a PLAYLIST global variable assigned to videodb://1/2/
so why is this passed to the JSON-RPC call. This is not a directory and the API ?
BTW trying to debug randomandlastitems.py