User Tools

Site Tools


doc:appunti:software:kodi_execute_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:software:kodi_execute_script [2023/06/05 12:20] – [Executing something from a plugin add-on] niccolodoc:appunti:software:kodi_execute_script [2026/02/23 09:14] (current) – [Executing a script from a Kodi plugin add-on] niccolo
Line 1: Line 1:
 ====== Executing a script from a Kodi plugin add-on ====== ====== Executing a script from a Kodi plugin add-on ======
  
-In trying to present my collection of images with a custom slideshow from Koid, I have tried different approaches. The first was to define an **[[kodi_external_player|external player]]**, the second was to create a **specific plugin that would launch an external program** and finally I created **a plugin that launches a Kodi add-on script**.+In trying to present my collection of images with a custom slideshow from Kodi, I have tried different approaches. The first was to define an **[[kodi_external_player|external player]]**, the second was to create a **specific plugin that would launch an external program** and finally I created **a plugin that launches a Kodi add-on script**.
  
 The first two methods failed because [[kodi_addon#cannot_execute_a_graphical_external_program|it is not possible to run a graphics program while Kodi is running]]. The first two methods failed because [[kodi_addon#cannot_execute_a_graphical_external_program|it is not possible to run a graphics program while Kodi is running]].
Line 13: Line 13:
 When a plugin add-on is invoked, it produces a **directory listing** where **some elements are sub-folders** and others are **playable items**. If the user selects a sub-folder, the plugin is called again and it produces another listing. If instead the user selects a playable item, the appropriate Kodi player is called. When a plugin add-on is invoked, it produces a **directory listing** where **some elements are sub-folders** and others are **playable items**. If the user selects a sub-folder, the plugin is called again and it produces another listing. If instead the user selects a playable item, the appropriate Kodi player is called.
  
-If you want, it is possibile to customize the action associated to a **ListItem** (media element shown into the plugin directory), overriding the default player; so it is possible to launch a generic external Python program or run a Kodi script add-on.+It is possibile to customize the action associated to a playable **ListItem** (the playable media element shown into the plugin directory), overriding the default player; so it is possible to launch a generic external Python program or run a Kodi script add-on. To obtain this you must tag the ListItem as ''IsPlayable = false'' and define its **url** as pointing to the plugin add-on itself. When the user select that item, the plugin is called again (call-bak) and you can execute the custom action on it. 
 + 
  
 ==== Executing an external Python program ==== ==== Executing an external Python program ====
doc/appunti/software/kodi_execute_script.1685960421.txt.gz · Last modified: by niccolo