def open_gui(self): log('firstrun? %s' % __setting__('firstrun')) if __setting__('firstrun') == 'fartstrue': log('Opening walkthru GUI') else: log('Opening OSMC settings GUI') try: # try opening the gui threading.Thread(target=self.stored_gui.open()).start() self.gui_last_accessed = datetime.datetime.now() self.skip_check = False except: # if that doesnt work then it is probably because the gui was too old and has been deleted # so recreate the gui and open it self.stored_gui = settings.OSMCGui(queue=self.parent_queue) self.gui_last_accessed = datetime.datetime.now() self.skip_check = False threading.Thread(target=self.stored_gui.open()).start() log('gui threading finished')
def __init__(self): # queue for communication with the comm and Main self.parent_queue = Queue.Queue() # create socket, listen for comms self.listener = comms.communicator( self.parent_queue, socket_file='/var/tmp/osmc.settings.sockfile') self.listener.start() # the gui is created and stored in memory for quick access # after a few hours, the gui should be removed from memory self.stored_gui = settings.OSMCGui(queue=self.parent_queue) self.gui_last_accessed = datetime.datetime.now() self.skip_check = True # monitor created to check for xbmc abort requests self.monitor = xbmc.Monitor() # daemon self._daemon() log('_daemon exited')
def create_gui(self): self.stored_gui = settings.OSMCGui(queue=self.parent_queue) self.stored_gui.setDaemon(True)
def create_gui(self): self.stored_gui = settings.OSMCGui(queue=self.parent_queue)