(2020-06-13, 14:33)DaVu Wrote: Maybe I misundestood, but what about: https://kodi.wiki/view/JSON-RPC_API/v12#...Properties ?
I imagine that method works. I was updating script.randomandlastitems to work in Matrix and for personal reasons wanted to get userrating as well as the other properties already in the json request. i assume the author used Files.GetDirectory because the script passes the special protocol path to the smart playlist whereas PlayList.GetProperties needs the playlist id (I'm guessing that takes an additional step or two to get the id). But in investigating why my mod didn't work, it seems like List.Fields.Files returns every other conceivable property
except userrating, so I'm guessing it was an oversight. FWIW the call to the api is:
Code:
_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}' %(PLAYLIST))
Where as stated PLAYLIST is the path/filename of a smart playlist passed into the script via an argument from the skin in a "runscript" window onload action.
scott s.
.