def run(self): # Check for authentication token log.info('X-Plex-Token: %s', 'available' if os.environ.get('PLEXTOKEN') else 'unavailable') # Process server startup state self.process_server_state() # Start new-style modules module_start() # Start modules names = [] for module in self.modules: if not hasattr(module, 'start'): continue names.append(get_class_name(module)) module.start() log.info('Started %s modules: %s', len(names), ', '.join(names)) ModuleManager.start() # Start plex.activity.py Activity.start(ACTIVITY_MODE.get(Preferences.get('activity.mode')))
def filter_available(cls): allowed = ACTIVITY_MODE.get(Prefs['activity_mode']) if not allowed: return cls.available = [ (k, v) for (k, v) in cls.available if v.name in allowed ]
def start(self): # Check for authentication token log.info('X-Plex-Token: %s', 'available' if os.environ.get('PLEXTOKEN') else 'unavailable') # Validate username/password spawn(self.authenticate) # Start modules names = [] for module in self.modules: if not hasattr(module, 'start'): continue names.append(get_class_name(module)) module.start() log.info('Started %s modules: %s', len(names), ', '.join(names)) ModuleManager.start() # Start plex.activity.py Activity.start(ACTIVITY_MODE.get(Prefs['activity_mode']))
def start(cls, blocking=False): enabled = ACTIVITY_MODE.get(Preferences.get('activity.mode')) # Start methods cls.started = cls.methods.start(enabled)