Add option to toggle SSL verification for tautulli

This commit is contained in:
samwiseg0 2018-11-01 13:27:20 -04:00
parent 8dfb5cc384
commit c1604d4383
2 changed files with 5 additions and 2 deletions

View file

@ -41,6 +41,7 @@ tautulli_url = 'https://tautulli.domain.tld'
tautulli_api_key = 'xxxxxxxxxxxxxxx'
tautulli_failback_ip = ''
tautulli_influxdb_db_name = 'plex'
tautulli_verify_ssl = True
########################## FIREWALL CONFIG ############################
asa_url = 'https://firewall.domain.tld'

View file

@ -12,8 +12,10 @@ CURRENT_TIME = datetime.now(timezone.utc).astimezone().isoformat()
PAYLOAD = {'apikey': configuration.tautulli_api_key, 'cmd': 'get_activity'}
ACTIVITY = requests.get('{}/api/v2'.format(configuration.tautulli_url),
params=PAYLOAD).json()['response']['data']
ACTIVITY = requests.get('{}/api/v2'.format(configuration.tautulli_url.rstrip('/')),
params=PAYLOAD,
verify=configuration.tautulli_verify_ssl
).json()['response']['data']
SESSIONS = {d['session_id']: d for d in ACTIVITY['sessions']}