Allow Access to ListItem Properties via JSON-RPC
#2
(2020-06-15, 21:56)drinfernoo Wrote: As the title states, this is a request to make ListItem Properties (as set by xbmcgui.ListItem.SetProperty(...)) available via a request to the JSON-RPC API.

Not being able to, as is the case now, has a number of implications for inter-addon communication, including, but not limited to, un/watched counts, resume points, extra item metadata, and even context menu items.

My proposed solution (albeit not one I'm prepared to tackle myself, as I'm not primarily a C++ developer, nor am I familiar in any way with Kodi's main codebase) would be to have available properties on a ListItem be included in the response from Files.GetDirectory, either as a separate object, or as part of the pre-existing properties object from the response. Provided someone with a bit more knowledge on the codebase could lend some guidance on where in the project these changes may be relevant, I could certainly take a whack at it!

I've also considered various workarounds to this issue, and detailed them in a different thread (along with an example add-on that basically serves to show that they are not reasonable approaches), but have not really made any headway, nor have I gotten any response. It is my belief that the correct way to handle this is to include them in the JSON-RPC response, so as to make this a standard operation, and not one that different developers will have to each find their own workaround for.
On the surface this seems like a minor request; however, the work required to register and store custom properties for a future JSON response is complex. I'm not sure the memory impact of your request; I'd assume the team would have to go the route of storing locally to the DB; which then would require additional code for sql maintenance.

It would be a neat feature, but I don't see it happening anytime soon. I personally hijack lesser-used listitem keys for passing custom entries.

BTW: your plugin example has a number of unorthodox lines of code... which are going to pose problems down the road.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply


Messages In This Thread
RE: Allow Access to ListItem Properties via JSON-RPC - by Lunatixz - 2020-06-16, 01:07
Logout Mark Read Team Forum Stats Members Help
Allow Access to ListItem Properties via JSON-RPC0