Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/bazarr/commit/b4071f0af6d73976680bbbcb2655259ca000200e?style=split&whitespace=ignore-eol You should set ROOT_URL correctly, otherwise the web may not work correctly.

Fixed betaseries provider when series doesn't exist.

pull/2437/head
morpheus65535 12 months ago
parent 1c25d125d3
commit b4071f0af6

@ -83,6 +83,14 @@ class BetaSeriesProvider(Provider):
logger.debug('Searching subtitles %r', params) logger.debug('Searching subtitles %r', params)
res = self.session.get( res = self.session.get(
server_url + 'episodes/display', params=params, timeout=10) server_url + 'episodes/display', params=params, timeout=10)
try:
if res.status_code == 400 and res.json()['errors'][0]['code'] == 4001:
# this is to catch no series found
return []
elif res.status_code == 400 and res.json()['errors'][0]['code'] == 1001:
raise AuthenticationError("Invalid token provided")
except Exception:
pass
res.raise_for_status() res.raise_for_status()
result = res.json() result = res.json()
matches.add('tvdb_id') matches.add('tvdb_id')
@ -96,8 +104,14 @@ class BetaSeriesProvider(Provider):
logger.debug('Searching subtitles %r', params) logger.debug('Searching subtitles %r', params)
res = self.session.get( res = self.session.get(
server_url + 'shows/episodes', params=params, timeout=10) server_url + 'shows/episodes', params=params, timeout=10)
if res.status_code == 400: try:
raise AuthenticationError("Invalid token provided") if res.status_code == 400 and res.json()['errors'][0]['code'] == 4001:
# this is to catch no series found
return []
elif res.status_code == 400 and res.json()['errors'][0]['code'] == 1001:
raise AuthenticationError("Invalid token provided")
except Exception:
pass
res.raise_for_status() res.raise_for_status()
result = res.json() result = res.json()
matches.add('series_tvdb_id') matches.add('series_tvdb_id')

Loading…
Cancel
Save