Registering to xbmc events - 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: Registering to xbmc events (/showthread.php?tid=160174) |
Registering to xbmc events - gkutiel - 2013-03-23 Hi I'm totally new to xbmc add-on development (and also relativly new to python). I managed to write an "hello world" add-on and it works fine. I searched the documentation but couldn't find any reference to a way that my script can register itself to events (player start, libraray updated, play count changed, etc...) Could anyone give me a reference to such mechanisim ? 10x Gilad p.s. My add-on is a script that start on xbmc startup. RE: Registering to xbmc events - Martijn - 2013-03-23 http://mirrors.xbmc.org/docs/python-docs/ example script: http://mirrors.xbmc.org/addons/frodo/script.watchlist/ RE: Registering to xbmc events - gkutiel - 2013-03-23 Thank you for the (extream) fast answer So this might be a stupid question, but in case I want to react to changes in the db then I need to extend the Monitor class (http://mirrors.xbmc.org/docs/python-docs/xbmc.html#Monitor) and implement the relevant methods ? 10x Re: Registering to xbmc events - Martijn - 2013-03-23 Yes but not sure if it will always trigger that event. Just try and find out |