Kodi Community Forum

Full Version: Event based scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to assign scripts to XBMC related events such as:

-DVD inserted
-New media file detected
-Media file played
-etc
Python should get the OnPlayback* events, so they can be used. You'll need to have your script start on startup and run a background thread waiting for the events.
Ok, having a process monitoring for certain events is one method (that would impact performance due to constant polling). Having the events hard coded into XBMC might be another.

How does XBMC detect when a DVD is inserted or when there are new media files?