diff options
-rw-r--r-- | custom_libs/subliminal_patch/providers/embeddedsubtitles.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py index 7fbf1bef8..1c1a99f7d 100644 --- a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py +++ b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py @@ -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 |