def restart(self): try: self.frontends['vdr'].detach() except: pass self.frontends['vdr'] = self.get_vdrFrontend() for frontend, obj in self.frontends.items(): if not obj: logging.warning("using dummy frontend") self.frontends[frontend] = vdrFrontend(self, 'dummy') self.startup()
def prepare(self): # init Frontends self.dbus2vdr = DBus2VDR(dbus.SystemBus(), instance=0) self.frontends = {} self.frontends['vdr'] = self.get_vdrFrontend() self.frontends['kodi'] = self.get_kodiFrontend() for frontend, obj in self.frontends.items(): if not obj: logging.warning("using dummy frontend") self.frontends[frontend] = vdrFrontend(self, 'dummy') self.switch = itertools.cycle(self.frontends.keys()) while not next(self.switch) == self.settings.frontend: pass logging.debug("set main frontend to {0}".format( self.settings.frontend)) self.startup()
def prepare(self): # init Frontends self.dbus2vdr = DBus2VDR(dbus.SystemBus(), instance=0) self.frontends = {} self.frontends['vdr'] = self.get_vdrFrontend() self.frontends['xbmc'] = self.get_xbmcFrontend() for frontend, obj in self.frontends.items(): if not obj: logging.warning("using dummy frontend") self.frontends[frontend] = vdrFrontend(self, 'dummy') self.switch = itertools.cycle(self.frontends.keys()) while not next(self.switch) == self.settings.frontend: pass logging.debug("set main frontend to {0}".format( self.settings.frontend)) self.startup()