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:14] – [Executing something from a plugin add-on] niccolodoc:appunti:software:kodi_execute_script [2023/06/05 12:26] (current) – [Executing something from a plugin add-on] niccolo
Line 7: Line 7:
 ===== Executing something from a plugin add-on ===== ===== Executing something from a plugin add-on =====
  
-As explained into the article **[[kodi_addon]]** it is possible to create **script add-ons** or **plugin add-ons** using Python (starting with Kodi 19 Matrix it is possible tu use the embedded Python 3). A **plugin add-on** is simply a container of media elements generally organized as a directory, **without specific playing capabilities**. The play of a content is generally delegated to the **native Kodi players** (video, audio or pictures).+As explained into the article **[[kodi_addon]]** it is possible to create **script add-ons** or **plugin add-ons** using Python. A **plugin add-on** is simply a container of media elements generally organized as a directory, **without specific playing capabilities**. The play of a content is generally delegated to the **native Kodi players** (video, audio or pictures). 
 + 
 +Starting with Kodi 19 Matrix it is possible tu use the embedded Python 3 as the programming language for plugins and scripts. 
 + 
 +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. 
 + 
 +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. 
  
-If you want, it is possibile to customize the action associated to a **ListItem** (a 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. 
  
 ==== Executing an external Python program ==== ==== Executing an external Python program ====
doc/appunti/software/kodi_execute_script.1685960064.txt.gz · Last modified: 2023/06/05 12:14 by niccolo