From b0e44f82c0665eb8aa1c2db1300055e2367ce734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 15 Aug 2019 21:29:21 -0400 Subject: [PATCH 1/2] Fix for keep encoding bug. --- bazarr/get_subtitle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 88889978e..da35f39dc 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -108,7 +108,7 @@ def download_subtitle(path, language, hi, forced, providers, providers_auth, sce if settings.general.getboolean('utf8_encode'): os.environ["SZ_KEEP_ENCODING"] = "" else: - os.environ["SZ_KEEP_ENCODING"] = True + os.environ["SZ_KEEP_ENCODING"] = "True" logging.debug('BAZARR Searching subtitles for this file: ' + path) if hi == "True": From 9ee50721cceffd05bf15da06bb3402b11ab4de63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 15 Aug 2019 21:55:21 -0400 Subject: [PATCH 2/2] Fix to fix for #517. --- bazarr/get_subtitle.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index da35f39dc..0f8810536 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -132,11 +132,11 @@ def download_subtitle(path, language, hi, forced, providers, providers_auth, sce for l in language: if l == 'pob': lang_obj = Language('por', 'BR') - if forced: + if forced == "True": lang_obj = Language.rebuild(lang_obj, forced=True) else: lang_obj = Language(l) - if forced: + if forced == "True": lang_obj = Language.rebuild(lang_obj, forced=True) language_set.add(lang_obj) @@ -569,7 +569,7 @@ def episode_download_subtitles(no): result = download_subtitle(path_replace(episode[0]), str(alpha3_from_alpha2(language.split(':')[0])), episode[4], - True if len(language.split(':')) > 1 else False, + "True" if len(language.split(':')) > 1 else "False", providers_list, providers_auth, str(episode[3]), @@ -613,7 +613,7 @@ def movies_download_subtitles(no): result = download_subtitle(path_replace_movie(movie[0]), str(alpha3_from_alpha2(language.split(':')[0])), movie[4], - True if len(language.split(':')) > 1 else False, + "True" if len(language.split(':')) > 1 else "False", providers_list, providers_auth, str(movie[3]), @@ -680,7 +680,7 @@ def wanted_download_subtitles(path, l, count_episodes): result = download_subtitle(path_replace(episode[0]), str(alpha3_from_alpha2(language.split(':')[0])), episode[4], - True if len(language.split(':')) > 1 else False, + "True" if len(language.split(':')) > 1 else "False", providers_list, providers_auth, str(episode[5]), @@ -741,7 +741,7 @@ def wanted_download_subtitles_movie(path, l, count_movies): result = download_subtitle(path_replace_movie(movie[0]), str(alpha3_from_alpha2(language.split(':')[0])), movie[4], - True if len(language.split(':')) > 1 else False, + "True" if len(language.split(':')) > 1 else "False", providers_list, providers_auth, str(movie[5]),