mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-09-20 07:25:58 +08:00
Embedded Subtitles provider: handle FileNotFoundError
This commit is contained in:
parent
a2fee0e1e4
commit
369b2c7343
|
@ -208,8 +208,11 @@ class EmbeddedSubtitlesProvider(Provider):
|
|||
except Exception as error:
|
||||
logger.debug("'%s' raised running modifier", error)
|
||||
|
||||
with open(path, "rb") as sub:
|
||||
subtitle.content = sub.read()
|
||||
if os.path.exists(path):
|
||||
with open(path, "rb") as sub:
|
||||
subtitle.content = sub.read()
|
||||
else:
|
||||
logger.error("%s not found in filesystem", path)
|
||||
|
||||
def _get_subtitle_path(self, subtitle: EmbeddedSubtitle):
|
||||
container = subtitle.container
|
||||
|
|
Loading…
Reference in a new issue