doc:appunti:software:kodi_addon
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:software:kodi_addon [2023/05/26 14:35] – [Cannot execute a graphical external program] niccolo | doc:appunti:software:kodi_addon [2023/05/26 14:58] – [How to start an external program from Kodi] niccolo | ||
---|---|---|---|
Line 309: | Line 309: | ||
==== How to start an external program from Kodi ==== | ==== How to start an external program from Kodi ==== | ||
- | <code python> | + | I tried (but failed) to start a Python graphical program from Kodi. Because there is not an X11 windowing system, I tried **Pygame** with the drivers **directfb**, |
- | xbmc.executebuiltin('XBMC.RunScript(special:// | + | |
- | </code> | + | To execute an external program from my add-on video plugin, I used the following two methods. The first one just starts an external Python |
<code python> | <code python> | ||
- | # This works only if it is a Python script. | + | # This works only for a Python script. |
# Notice " | # Notice " | ||
xbmc.executescript(' | xbmc.executescript(' | ||
</ | </ | ||
+ | |||
+ | This second method will add a context menu item to the add-on '' | ||
<code python> | <code python> | ||
- | # Add a context menu item to the listItem | + | # Add a context menu item to the add-on xbmcgui.ListItem |
+ | # This works only for a Python script. | ||
li.addContextMenuItems([(' | li.addContextMenuItems([(' | ||
+ | </ | ||
+ | |||
+ | A third method should be the following, but I did not tried it: | ||
+ | |||
+ | <code python> | ||
+ | xbmc.executebuiltin(' | ||
+ | </ | ||
+ | |||
+ | Another non-tested code to execute a Kodi plugin: | ||
+ | |||
+ | <code python> | ||
+ | xbmc.executebuiltin(' | ||
</ | </ | ||
Line 330: | Line 345: | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[https:// | ||
===== Web References ===== | ===== Web References ===== |
doc/appunti/software/kodi_addon.txt · Last modified: 2023/05/26 15:05 by niccolo