Merge pull request #1014 from GermanG/betaseriesfix

Betaseriesfix
pull/1038/head
morpheus65535 4 years ago committed by GitHub
commit 270e223107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,7 +139,11 @@ 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()
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 +157,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…
Cancel
Save