Context Item Add-ons

Context item add-ons allows the context menu in Kodi to be extended. Add-ons must provide the  extension point and a definition. Example:

The label to show in the context menu. String or an ID from the language file.

A visibility expression that determines when the item will be visible in the context menu.

The parent group for the context item. If "kodi.core.manage" the item will be added under the "Manage" sub-menu. If not specified, it will be added to the top level.

It is currently only possible to provide one item per add-on.

This feature requires at least version 2.20.0 of the Python API, which should be specified in the Addon.xml element:

The item the context menu was opened on can be accessed in python via the  attribute. The attribute is an instance of.

Example python script
This example script will display a notification message showing the name of item the context menu was opened on: