2015-08-03, 21:01
The new context menu item add-ons in Isengard pass along the selected item as sys.listitem, and I would like to get DBID and DBTYPE from it, so that I can look up the selected item via JSON-RPC or pass it along to another script.
xbmc.getInfoLabel('ListItem.XX') isn't always accurate (details and test add-on, 3rd post), and the docs do say to use sys.listitem, so I think these should be available from the Python ListItem.
Solution: Kodi 18 Leia added getDbId() and getMediaType() to InfoTagVideo, so this info is now available via sys.listitem.getVideoInfoTag().getDbId() and sys.listitem.getVideoInfoTag().getMediaType(). Huzzah!
xbmc.getInfoLabel('ListItem.XX') isn't always accurate (details and test add-on, 3rd post), and the docs do say to use sys.listitem, so I think these should be available from the Python ListItem.
Solution: Kodi 18 Leia added getDbId() and getMediaType() to InfoTagVideo, so this info is now available via sys.listitem.getVideoInfoTag().getDbId() and sys.listitem.getVideoInfoTag().getMediaType(). Huzzah!