summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVitiko <[email protected]>2021-12-23 19:45:26 -0400
committerVitiko <[email protected]>2021-12-23 19:45:26 -0400
commit048307e4299106ea2340bed72fce8207859d5fa9 (patch)
treecf8365cd6776c02c4c96c1483ae17f5c2ed630a5
parentd0b93a7b3514fc09554b81c9439cbdaa77125e15 (diff)
downloadbazarr-048307e4299106ea2340bed72fce8207859d5fa9.tar.gz
bazarr-048307e4299106ea2340bed72fce8207859d5fa9.zip
Update embeddedsubtitles provider: use original_path instead of name
-rw-r--r--libs/subliminal_patch/providers/embeddedsubtitles.py6
-rw-r--r--libs/subliminal_patch/video.py1
2 files changed, 6 insertions, 1 deletions
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