From 13238b121809cbf3e1ef9048d4b42aa62cb90a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 26 Jul 2020 13:42:41 -0400 Subject: [PATCH] Fix for .vtt files not being recognized as valid external subtitles. --- bazarr/list_subtitles.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bazarr/list_subtitles.py b/bazarr/list_subtitles.py index 1048b494d..f1c3b6df3 100644 --- a/bazarr/list_subtitles.py +++ b/bazarr/list_subtitles.py @@ -5,9 +5,7 @@ import os import logging import ast from guess_language import guess_language -import subliminal_patch -from subliminal import core -from subliminal_patch import search_external_subtitles +from subliminal_patch import core, search_external_subtitles from subzero.language import Language from database import database @@ -54,7 +52,7 @@ def store_subtitles(original_path, reversed_path): brazilian_portuguese_forced = [".pt-br.forced", ".pob.forced", "pb.forced"] try: dest_folder = get_subtitle_destination_folder() - subliminal_patch.core.CUSTOM_PATHS = [dest_folder] if dest_folder else [] + core.CUSTOM_PATHS = [dest_folder] if dest_folder else [] subtitles = search_external_subtitles(reversed_path, languages=get_language_set(), only_one=settings.general.getboolean('single_language')) subtitles = guess_external_subtitles(get_subtitle_destination_folder() or os.path.dirname(reversed_path), subtitles) @@ -130,7 +128,7 @@ def store_subtitles_movie(original_path, reversed_path): brazilian_portuguese_forced = [".pt-br.forced", ".pob.forced", "pb.forced"] try: dest_folder = get_subtitle_destination_folder() or '' - subliminal_patch.core.CUSTOM_PATHS = [dest_folder] if dest_folder else [] + core.CUSTOM_PATHS = [dest_folder] if dest_folder else [] subtitles = search_external_subtitles(reversed_path, languages=get_language_set()) subtitles = guess_external_subtitles(get_subtitle_destination_folder() or os.path.dirname(reversed_path), subtitles) except Exception as e: