List.Fields.Files doesn't provide "userrating"
#1
I don't understand how the JSON-RPC is implemented.  Is this just a case of needing to update interfaces/json-rpc/schema/types.json for List.Fields.Files and I guess maybe List.Fields.All?

The goal is to be able to retrieve the property "userrating" in method Files.GetDirectory for a playlist in this case media is "video" but should also work for music I think.

scott s.
.
Reply
#2
Maybe I misundestood, but what about: https://kodi.wiki/view/JSON-RPC_API/v12#...Properties ?
Reply
#3
(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.
.
Reply
#4
Just to mention it, List.Fields.All gives the option for "userrating"

https://github.com/xbmc/xbmc/blob/master...json#L1539
Reply

Logout Mark Read Team Forum Stats Members Help
List.Fields.Files doesn't provide "userrating"0