add sonarr sectionchecking
This commit is contained in:
parent
88f5e22cec
commit
c893229098
1 changed files with 20 additions and 16 deletions
|
@ -69,6 +69,7 @@ class INIParser(object):
|
||||||
if self.sonarr_enabled:
|
if self.sonarr_enabled:
|
||||||
for server_id in self.sonarr_enabled:
|
for server_id in self.sonarr_enabled:
|
||||||
sonarr_section = 'sonarr-' + str(server_id)
|
sonarr_section = 'sonarr-' + str(server_id)
|
||||||
|
try:
|
||||||
url = self.config.get(sonarr_section, 'url')
|
url = self.config.get(sonarr_section, 'url')
|
||||||
apikey = self.config.get(sonarr_section, 'apikey')
|
apikey = self.config.get(sonarr_section, 'apikey')
|
||||||
scheme = 'https://' if self.config.getboolean(sonarr_section, 'ssl') else 'http://'
|
scheme = 'https://' if self.config.getboolean(sonarr_section, 'ssl') else 'http://'
|
||||||
|
@ -86,6 +87,9 @@ class INIParser(object):
|
||||||
missing_days_run_seconds, future_days, future_days_run_seconds,
|
missing_days_run_seconds, future_days, future_days_run_seconds,
|
||||||
queue, queue_run_seconds)
|
queue, queue_run_seconds)
|
||||||
self.sonarr_servers.append(server)
|
self.sonarr_servers.append(server)
|
||||||
|
except configparser.NoOptionError as e:
|
||||||
|
self.radarr_enabled = False
|
||||||
|
logger.error('%s disabled. Error: %s', sonarr_section, e)
|
||||||
|
|
||||||
# Parse Radarr options
|
# Parse Radarr options
|
||||||
self.radarr_enabled = self.enable_check('radarr_server_ids')
|
self.radarr_enabled = self.enable_check('radarr_server_ids')
|
||||||
|
|
Loading…
Reference in a new issue