Kodi Community Forum
How to log all the properties? - 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: How to log all the properties? (/showthread.php?tid=264917)



How to log all the properties? - raziellight - 2016-03-18

I was trying to figure out what a property was, and figured it was probably a property in an object. Am i right? I would like to get all the properties of a window or list item or whatever. How would i do this? I know about getProperty(...) but it's like you have to know the properties already or you can't use it... Thanks..


RE: How to log all the properties? - ronie - 2016-03-18

it's not possible to retrieve a list of all properties.


RE: How to log all the properties? - raziellight - 2016-03-18

Thanks for the reply. So how am i supposed to know what properties there are?


RE: How to log all the properties? - Lunatixz - 2016-03-18

(2016-03-18, 23:31)raziellight Wrote: Thanks for the reply. So how am i supposed to know what properties there are?

You create your own properties while coding, or use some of the static properties setup by kodi. Start here: http://mirrors.xbmc.org/docs/python-docs/

If you are trying to use a specific script that sets properties refer to their readme or development blog.


RE: How to log all the properties? - raziellight - 2016-03-19

I know about the python-docs. The thing is there seems to be a gap in documentation for built in properties. For example, li.setProperty('IsPlayable', 'true') is all over the place in code, and seem to be built in, yet it's not in the python-docs, and it can only be found in code. There is no reference for it. Seems like there should be a place for these built in properties... And i do not see any properties for windows or listitems in the python docs.


RE: How to log all the properties? - ronie - 2016-03-19

(2016-03-18, 23:31)raziellight Wrote: Thanks for the reply. So how am i supposed to know what properties there are?

there are only a few built-in properties.
properties are mostly defined by skins or addons and can have any name.

perhaps you could start by explaining what you're trying to accomplish.


RE: How to log all the properties? - raziellight - 2016-03-19

Right now i'm just getting my feet wet in figuring out kodi. But i've wanted to get the url of the media playing and have a button in the video, and thought there might be a property in kodi for it. When you click on it, a window will pop up with the url of the playing video. Since properties aren't explained very well, i didn't know that they were mostly used in the add-on code. I tried ListItem.Path but it just came up with the kodi url for iptv simple client, and just listed the stream as 0001 after a url. So that was less than ideal. There seems to be no built in feature to get this either. You have to go to the actual files and get the links there by digging through lines of text.


RE: How to log all the properties? - ronie - 2016-03-19

ah, you're trying to retrieve infolabels, rather then properties.

you can get those using xbmc.getInfoLabel() and a full list of them is available here:
http://kodi.wiki/view/InfoLabels

xbmc.getInfoLabel('Player.Filename') should return the filename of the currently playing video.
though i don't think streams really have file names, i may indeed be some url.