Kodi Community Forum
Event based scripts - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Event based scripts (/showthread.php?tid=39586)



Event based scripts - berdelyi - 2008-10-28

Is it possible to assign scripts to XBMC related events such as:

-DVD inserted
-New media file detected
-Media file played
-etc


- jmarshall - 2008-10-28

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.


- berdelyi - 2008-10-28

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?