Esempio n. 1
0
 def enable(self):
     try:
         self.plex = fetch_plex_instance(self.pkmeter)
         super(Plugin, self).enable()
     except NotFound:
         log.warning('Plex server not available.')
         return self.disable()
Esempio n. 2
0
 def enable(self):
     try:
         self.plex = fetch_plex_instance(self.pkmeter)
         super(Plugin, self).enable()
     except NotFound:
         log.warning('Plex server not available.')
         return self.disable()
Esempio n. 3
0
 def enable(self):
     try:
         sensors.init()
         super(Plugin, self).enable()
     except Exception:
         log.warning('Plex server not available.')
         return self.disable()
Esempio n. 4
0
 def enable(self):
     try:
         sensors.init()
         super(Plugin, self).enable()
     except Exception:
         log.warning("Plex server not available.")
         return self.disable()
Esempio n. 5
0
 def enable(self):
     apikey = self.pkmeter.config.get(self.namespace, 'apikey')
     self.location = self.pkmeter.config.get(self.namespace, 'location', 'autoip')
     if not apikey:
         log.warning('Wunderground apikey not specified.')
         return self.disable()
     self.update_url = UPDATE_URL % {'apikey':apikey, 'location':self.location}
     super(Plugin, self).enable()
Esempio n. 6
0
 def enable(self):
     try:
         self.card_name = self._fetch_card_name()
         result = utils.get_stdout('%s --version' % NVIDIA_SETTINGS)
         assert 'NVIDIA' in result, 'nvidia-settings not found.'
         super(Plugin, self).enable()
     except Exception as err:
         log.warning('NVIDIA plugin disabled: %s', err)
         return self.disable()
Esempio n. 7
0
 def enable(self):
     try:
         self.plex = fetch_plex_instance(self.pkmeter)
         self.ignores = self.pkmeter.config.get(self.namespace, 'ignores', '')
         self.ignores = list(filter(None, self.ignores.split('\n')))
         super(Plugin, self).enable()
     except NotFound:
         log.warning('Plex server not available.')
         return self.disable()
Esempio n. 8
0
 def enable(self):
     try:
         self.card_name = self._fetch_card_name()
         result = utils.get_stdout('%s --version' % NVIDIA_SETTINGS)
         assert 'NVIDIA' in result, 'nvidia-settings not found.'
         super(Plugin, self).enable()
     except Exception as err:
         log.warning('NVIDIA plugin disabled: %s', err)
         return self.disable()
Esempio n. 9
0
 def enable(self):
     self.username = self.pkmeter.config.get(self.namespace, 'username', '')
     if not self.username:
         log.warning('Username not specified.')
         return self.disable()
     self.albums_url = ALBUMS_URL % {'username':self.username}
     self.ignores = self.pkmeter.config.get(self.namespace, 'ignores', '')
     self.ignores = list(filter(None, self.ignores.split('\n')))
     self.last_albums_update = 0
     super(Plugin, self).enable()
Esempio n. 10
0
 def enable(self):
     try:
         self.plex = fetch_plex_instance(self.pkmeter)
         self.ignores = self.pkmeter.config.get(self.namespace, 'ignores',
                                                '')
         self.ignores = list(filter(None, self.ignores.split('\n')))
         super(Plugin, self).enable()
     except NotFound:
         log.warning('Plex server not available.')
         return self.disable()
Esempio n. 11
0
 def enable(self):
     self.host = self.pkmeter.config.get(self.namespace, 'host', '').lstrip('/')
     self.apikey = self.pkmeter.config.get(self.namespace, 'apikey')
     if not self.host:
         log.warning('Sonarr host not specified.')
         return self.disable()
     if not self.apikey:
         log.warning('Sonarr apikey not specified.')
         return self.disable()
     self.ignores = self.pkmeter.config.get('plexmedia', 'ignores', '')
     self.ignores = list(filter(None, self.ignores.split('\n')))
     super(Plugin, self).enable()
Esempio n. 12
0
 def enable(self):
     apikey = self.pkmeter.config.get(self.namespace, 'apikey')
     self.location = self.pkmeter.config.get(self.namespace, 'location',
                                             'autoip')
     if not apikey:
         log.warning('Wunderground apikey not specified.')
         return self.disable()
     self.update_url = UPDATE_URL % {
         'apikey': apikey,
         'location': self.location
     }
     super(Plugin, self).enable()
Esempio n. 13
0
 def enable(self):
     self.host = self.pkmeter.config.get(self.namespace, 'host',
                                         '').lstrip('/')
     self.apikey = self.pkmeter.config.get(self.namespace, 'apikey')
     if not self.host:
         log.warning('Sonarr host not specified.')
         return self.disable()
     if not self.apikey:
         log.warning('Sonarr apikey not specified.')
         return self.disable()
     self.ignores = self.pkmeter.config.get('plexmedia', 'ignores', '')
     self.ignores = list(filter(None, self.ignores.split('\n')))
     super(Plugin, self).enable()
Esempio n. 14
0
 def enable(self):
     self.host = self.pkmeter.config.get(self.namespace, 'host', '').lstrip('/')
     apikey = self.pkmeter.config.get(self.namespace, 'apikey')
     if not self.host:
         log.warning('Sickbeard host not specified.')
         return self.disable()
     if not apikey:
         log.warning('Sickbeard apikey not specified.')
         return self.disable()
     self.update_url = UPDATE_URL % {'host':self.host, 'apikey':apikey}
     self.ignores = self.pkmeter.config.get('plexmedia', 'ignores', '')
     self.ignores = list(filter(None, self.ignores.split('\n')))
     super(Plugin, self).enable()