2017-09-22, 15:02
I've just added an onNotification method to my monitor class in my addon to intercept the onWake notification. Everything is good, when the system wakes up, I get an event.
However, the waitForAbort() that I was using in the main loop is no longer detecting the onQuit event so it doesn't let Kodi shutdown.
The onQuit event is being picked up by onNotification, and I currently am setting a variable to be True and then doing my own check followed by xbmc.sleep(10) as an alternative to waitForAbort(10).
Is this the right approach? Will doing the sleep cause any problems (I've not seen any yet)? I'm on Kodi 17 if that makes any difference to this.
However, the waitForAbort() that I was using in the main loop is no longer detecting the onQuit event so it doesn't let Kodi shutdown.
The onQuit event is being picked up by onNotification, and I currently am setting a variable to be True and then doing my own check followed by xbmc.sleep(10) as an alternative to waitForAbort(10).
Is this the right approach? Will doing the sleep cause any problems (I've not seen any yet)? I'm on Kodi 17 if that makes any difference to this.