doc:appunti:software:kodi_addon
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:software:kodi_addon [2023/05/26 16:43] – [How to start an external program from Kodi] niccolo | doc:appunti:software:kodi_addon [2023/05/26 17:05] (current) – [How to start an external program from Kodi] niccolo | ||
|---|---|---|---|
| Line 311: | Line 311: | ||
| 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**, | 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**, | ||
| - | <code python> | + | 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 |
| - | xbmc.executebuiltin(' | + | |
| - | </code> | + | |
| <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 add-on xbmcgui.ListItem object. | # Add a context menu item to the add-on xbmcgui.ListItem object. | ||
| + | # 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(' | ||
| + | </ | ||
| + | |||
| + | Other non-tested code to execute plugins or scripts: | ||
| + | |||
| + | <code python> | ||
| + | xbmc.executebuiltin(' | ||
| + | xbmc.executebuiltin(' | ||
| + | xbmc.executebuiltin(' | ||
| </ | </ | ||
| Line 332: | Line 347: | ||
| * **[[https:// | * **[[https:// | ||
| * **[[https:// | * **[[https:// | ||
| + | * **[[https:// | ||
| + | * **[[https:// | ||
| ===== Web References ===== | ===== Web References ===== | ||
doc/appunti/software/kodi_addon.1685112197.txt.gz · Last modified: by niccolo
