def __init__(self): KodiMonitor = Kodi_Monitor() listItemMonitor = ListItemMonitor() backgroundsUpdater = BackgroundsUpdater() webService = WebService() lastSkin = None #start the extra threads listItemMonitor.start() backgroundsUpdater.start() webService.start() while not KodiMonitor.abortRequested(): #set skin info currentSkin = xbmc.getSkinDir() if lastSkin != currentSkin: utils.setSkinVersion() lastSkin = currentSkin KodiMonitor.waitForAbort(10) else: # Abort was requested while waiting. We should exit utils.logMsg('Shutdown requested !', 0) #stop the extra threads backgroundsUpdater.stop() listItemMonitor.stop() webService.stop()
def __init__(self): utils.WINDOW.clearProperty("SkinHelperShutdownRequested") KodiMonitor = Kodi_Monitor() listItemMonitor = ListItemMonitor() backgroundsUpdater = BackgroundsUpdater() webService = WebService() lastSkin = None #start the extra threads listItemMonitor.start() backgroundsUpdater.start() webService.start() while not (KodiMonitor.abortRequested() or utils.WINDOW.getProperty("SkinHelperShutdownRequested")): self.checkSkinVersion() KodiMonitor.waitForAbort(10) else: # Abort was requested while waiting. We should exit utils.WINDOW.setProperty("SkinHelperShutdownRequested", "shutdown") utils.logMsg('Shutdown requested !', 0) #stop the extra threads backgroundsUpdater.stop() listItemMonitor.stop() webService.stop()