What does this function do/return?? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: What does this function do/return?? (/showthread.php?tid=171227) |
What does this function do/return?? - anibeasts - 2013-08-14 _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/frodo/xbmc.html What's that on the end %(_item['file']) ? RE: What does this function do/return?? - Milhouse - 2013-08-14 % (_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. RE: What does this function do/return?? - anibeasts - 2013-08-14 Ok I get it. Its the variable to fill the parameter in the string. RE: What does this function do/return?? - Milhouse - 2013-08-14 Yep. RE: What does this function do/return?? - anibeasts - 2013-08-14 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 |