How to use the new Monitor() class (Gotham)?
#1
Hello,

I've written a service that polls a communication port and runs in a while-loop. A good idea is using the new Monitor() class with the event onSettingsChanged() when the settings of my service has changed. But I'm getting stuck to implement this. I want to call my method 'getAddonProperties() in MyClass instead of deactivate/activate my addon every time the settings has changed. Is there an example outside anyway?

Some code:

Code:
class MyClass():
    
    def __init__(self):

        self.getAddonProperties()

    def getAddonProperties(self):
        # get settings, this stuff work...
        self._LS = __settings__.getLocalizedString
        self._server = __settings__.getSetting('server')
        # ...

while not xbmc.abortRequested():
        # do my service
        # ...
Reply

Logout Mark Read Team Forum Stats Members Help
How to use the new Monitor() class (Gotham)?0