|
|
@ -16,7 +16,7 @@ from bs4 import UnicodeDammit
|
|
|
|
from itertools import islice
|
|
|
|
from itertools import islice
|
|
|
|
|
|
|
|
|
|
|
|
from get_args import args
|
|
|
|
from get_args import args
|
|
|
|
from get_languages import alpha2_from_alpha3
|
|
|
|
from get_languages import alpha2_from_alpha3, get_language_set
|
|
|
|
from config import settings
|
|
|
|
from config import settings
|
|
|
|
from helper import path_replace, path_replace_movie, path_replace_reverse, \
|
|
|
|
from helper import path_replace, path_replace_movie, path_replace_reverse, \
|
|
|
|
path_replace_reverse_movie, get_subtitle_destination_folder
|
|
|
|
path_replace_reverse_movie, get_subtitle_destination_folder
|
|
|
@ -56,7 +56,8 @@ def store_subtitles(file):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
dest_folder = get_subtitle_destination_folder()
|
|
|
|
dest_folder = get_subtitle_destination_folder()
|
|
|
|
subliminal_patch.core.CUSTOM_PATHS = [dest_folder] if dest_folder else []
|
|
|
|
subliminal_patch.core.CUSTOM_PATHS = [dest_folder] if dest_folder else []
|
|
|
|
subtitles = search_external_subtitles(file)
|
|
|
|
subtitles = search_external_subtitles(file, languages=get_language_set(),
|
|
|
|
|
|
|
|
only_one=settings.general.getboolean('single_language'))
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
logging.exception("BAZARR unable to index external subtitles.")
|
|
|
|
logging.exception("BAZARR unable to index external subtitles.")
|
|
|
|
pass
|
|
|
|
pass
|
|
|
@ -140,7 +141,8 @@ def store_subtitles_movie(file):
|
|
|
|
subtitles = search_external_subtitles(file)
|
|
|
|
subtitles = search_external_subtitles(file)
|
|
|
|
brazilian_portuguese = [".pt-br", ".pob", "pb"]
|
|
|
|
brazilian_portuguese = [".pt-br", ".pob", "pb"]
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
subtitles = core.search_external_subtitles(file)
|
|
|
|
subtitles = search_external_subtitles(file, languages=get_language_set(),
|
|
|
|
|
|
|
|
only_one=settings.general.getboolean('single_language'))
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
logging.exception("BAZARR unable to index external subtitles.")
|
|
|
|
logging.exception("BAZARR unable to index external subtitles.")
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|