diff --git a/libs/subliminal_patch/providers/embeddedsubtitles.py b/libs/subliminal_patch/providers/embeddedsubtitles.py index aa8927fd6..d634eb735 100644 --- a/libs/subliminal_patch/providers/embeddedsubtitles.py +++ b/libs/subliminal_patch/providers/embeddedsubtitles.py @@ -142,7 +142,11 @@ class EmbeddedSubtitlesProvider(Provider): return subtitles def list_subtitles(self, video, languages): - return self.query(video.name, languages) + if not os.path.isfile(video.original_path): + logger.debug("Ignoring inexistent file: %s", video.original_path) + return [] + + return self.query(video.original_path, languages) def download_subtitle(self, subtitle): path = self._get_subtitle_path(subtitle) diff --git a/libs/subliminal_patch/video.py b/libs/subliminal_patch/video.py index 00260c058..b58c452be 100644 --- a/libs/subliminal_patch/video.py +++ b/libs/subliminal_patch/video.py @@ -28,3 +28,4 @@ class Video(Video_): self.external_subtitle_languages = set() self.streaming_service = streaming_service self.edition = edition + self.original_path = name