mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-11 01:07:36 +08:00
betaseries: logging 404 errors instead of raising
This commit is contained in:
parent
ea792a09f1
commit
dae68d7e8b
1 changed files with 7 additions and 2 deletions
|
@ -139,7 +139,12 @@ class BetaSeriesProvider(Provider):
|
|||
def download_subtitle(self, subtitle):
|
||||
logger.info('Downloading subtitle %r', subtitle)
|
||||
r = self.session.get(subtitle.download_link, timeout=10)
|
||||
r.raise_for_status()
|
||||
print('STATUS %s' % r.status_code)
|
||||
if r.status_code == 404:
|
||||
logger.error('Error 404 downloading %r', subtitle)
|
||||
return
|
||||
else:
|
||||
r.raise_for_status()
|
||||
|
||||
archive = _get_archive(r.content)
|
||||
if archive:
|
||||
|
@ -153,7 +158,7 @@ class BetaSeriesProvider(Provider):
|
|||
if subtitle_content:
|
||||
subtitle.content = fix_line_ending(subtitle_content)
|
||||
else:
|
||||
logger.debug('Could not extract subtitle from %r', archive)
|
||||
logger.error('Could not extract subtitle from %r', archive)
|
||||
|
||||
|
||||
def _get_archive(content):
|
||||
|
|
Loading…
Reference in a new issue