diff options
author | morpheus65535 <[email protected]> | 2021-05-31 22:01:35 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-05-31 22:01:35 -0400 |
commit | b8512ccf0908c0d0eea932fadb8a432e0ab6cfaf (patch) | |
tree | 7572e10bd70a11a250d81eedc62046b91aa2cee5 | |
parent | 3468601d4d4b9078e76b7a5335da44ab19f97f1e (diff) | |
download | bazarr-b8512ccf0908c0d0eea932fadb8a432e0ab6cfaf.tar.gz bazarr-b8512ccf0908c0d0eea932fadb8a432e0ab6cfaf.zip |
Disabled SSL verify for Sonarr SignalR feed connection and added Bazarr user agent to both Sonarr and Radarr feeds.v0.9.6-beta.15
-rw-r--r-- | bazarr/signalr_client.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bazarr/signalr_client.py b/bazarr/signalr_client.py index e99d4841c..4c7665e0a 100644 --- a/bazarr/signalr_client.py +++ b/bazarr/signalr_client.py @@ -4,6 +4,7 @@ import logging import gevent import json +import os from requests import Session from signalr import Connection from requests.exceptions import ConnectionError @@ -18,11 +19,17 @@ from utils import get_sonarr_version from get_args import args +headers = {"User-Agent": os.environ["SZ_USER_AGENT"]} + + class SonarrSignalrClient: def __init__(self): super(SonarrSignalrClient, self).__init__() self.apikey_sonarr = None self.session = Session() + self.session.timeout = 60 + self.session.verify = False + self.session.headers = headers self.connection = None def start(self): @@ -116,7 +123,8 @@ class RadarrSignalrClient: self.connection = HubConnectionBuilder() \ .with_url(url_radarr() + "/signalr/messages?access_token={}".format(self.apikey_radarr), options={ - "verify_ssl": False + "verify_ssl": False, + "headers": headers }) \ .with_automatic_reconnect({ "type": "raw", |