mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-22 15:54:26 +00:00
Handle bad JSON results from subsynchro provider #2735
This commit is contained in:
parent
c615f99f06
commit
239ab780eb
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ import os
|
|||
from zipfile import ZipFile, is_zipfile
|
||||
from requests import Session
|
||||
from guessit import guessit
|
||||
from requests.exceptions import JSONDecodeError
|
||||
|
||||
from subliminal import Movie
|
||||
from subliminal.subtitle import SUBTITLE_EXTENSIONS, fix_line_ending
|
||||
|
@ -91,7 +92,11 @@ class SubsynchroProvider(Provider):
|
|||
result.raise_for_status()
|
||||
|
||||
subtitles = []
|
||||
results = result.json() or {}
|
||||
|
||||
try:
|
||||
results = result.json()
|
||||
except JSONDecodeError:
|
||||
results = {}
|
||||
|
||||
status_ = results.get("status")
|
||||
|
||||
|
|
Loading…
Reference in a new issue