def onInit(self): self.background = self.getControl(101) self.getControl(102).setVisible(False) self.background.setVisible(True) self.currentIdx=settings.getSetting('last_trailer') self.playerTimer = threading.Timer(2.0, self.playerTimerAction) self.playerTimer.name = "PlayerTimer" self.infoTimer = threading.Timer(5.0, self.hideInfo) # self.myEPG = EPGWindow("script.FurkTrailers.EPG.xml", ADDON_INFO, "default") # self.myEPG.MyOverlayWindow = self # Don't allow any actions during initialization #self.actionSemaphore.acquire() if self.currentIdx == '' or self.currentIdx > : self.currentIdx = 0 # Akin refresh = createTrailers.getReco(1) if refresh: self.currentIdx = 0 self.timeStarted = time.time() self.notificationTimer = threading.Timer(5, self.notificationAction) self.currentChannel = 1 self.setChannel(self.currentChannel) self.background.setVisible(False) self.startNotificationTimer() self.playerTimer.start() #self.actionSemaphore.release() self.log('onInit return')
updateDialog.update(5, "Initializing", "Receiving Movies from trakt") updateDialog.update(70, "Initializing", "Checking Other Instances") updateDialog.update(95, "Initializing", "Migrating") self.playerTimer = threading.Timer(2.0, self.playerTimerAction) self.playerTimer.name = "PlayerTimer" self.infoTimer = threading.Timer(5.0, self.hideInfo) #self.myEPG = EPGWindow("script.FurkTrailers.EPG.xml", ADDON_INFO, "default") #self.myEPG.MyOverlayWindow = self # Don't allow any actions during initialization self.actionSemaphore.acquire() updateDialog.close() # Akin refresh = createTrailers.getReco(1) if refresh: self.currentIdx=0 self.timeStarted = time.time() self.notificationTimer = threading.Timer(NOTIFICATION_CHECK_TIME, self.notificationAction) self.currentChannel = 1 self.setChannel(self.currentChannel) self.background.setVisible(False) self.startNotificationTimer() self.playerTimer.start() self.actionSemaphore.release()