mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-14 18:25:30 +00:00
Added a catch for invalid JSON returned during Sonarr SignalR feed connection.
This commit is contained in:
parent
3abab89dbc
commit
1a07a00e71
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
import logging
|
||||
|
||||
import gevent
|
||||
import json
|
||||
from requests import Session
|
||||
from signalr import Connection
|
||||
from requests.exceptions import ConnectionError
|
||||
|
@ -37,6 +38,9 @@ class SonarrSignalrClient:
|
|||
self.connection.start()
|
||||
except ConnectionError:
|
||||
gevent.sleep(5)
|
||||
except json.decoder.JSONDecodeError:
|
||||
logging.error('BAZARR cannot parse JSON returned by SignalR feed.')
|
||||
self.stop()
|
||||
logging.info('BAZARR SignalR client for Sonarr is connected and waiting for events.')
|
||||
if not args.dev:
|
||||
scheduler.execute_job_now('update_series')
|
||||
|
|
Loading…
Reference in a new issue