mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-22 22:04:41 +08:00
libs: update subliminal_patch to newest develop: fix subscene missing poster; don't raise an exception when subtitle not found inside archive
This commit is contained in:
parent
67963633ef
commit
f7550e1889
2 changed files with 7 additions and 2 deletions
|
@ -148,7 +148,8 @@ class ProviderSubtitleArchiveMixin(object):
|
||||||
subs_fallback.append(sub_name)
|
subs_fallback.append(sub_name)
|
||||||
|
|
||||||
if not matching_sub and not subs_unsure and not subs_fallback:
|
if not matching_sub and not subs_unsure and not subs_fallback:
|
||||||
raise ProviderError("None of expected subtitle found in archive")
|
logger.error("None of expected subtitle found in archive")
|
||||||
|
return
|
||||||
|
|
||||||
elif subs_unsure:
|
elif subs_unsure:
|
||||||
matching_sub = subs_unsure[0]
|
matching_sub = subs_unsure[0]
|
||||||
|
|
|
@ -176,8 +176,12 @@ class Film(object):
|
||||||
|
|
||||||
content = soup.find("div", "subtitles")
|
content = soup.find("div", "subtitles")
|
||||||
header = content.find("div", "box clearfix")
|
header = content.find("div", "box clearfix")
|
||||||
|
cover = None
|
||||||
|
|
||||||
cover = header.find("div", "poster").img.get("src")
|
try:
|
||||||
|
cover = header.find("div", "poster").img.get("src")
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
title = header.find("div", "header").h2.text[:-12].strip()
|
title = header.find("div", "header").h2.text[:-12].strip()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue