diff options
author | Vitiko <[email protected]> | 2022-05-13 14:38:51 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2022-05-13 14:38:51 -0400 |
commit | 5f0f654efe069e51a575c05faf48432b2f2b1a39 (patch) | |
tree | 7f9505e497182b842e476c7365ed396b58b84dcb | |
parent | 9c2737c963f4666b88cc8871985945fd8dab5fed (diff) | |
download | bazarr-1.0.5-beta.8.tar.gz bazarr-1.0.5-beta.8.zip |
Fix some foreign providers not being updated properlyv1.0.5-beta.8
-rw-r--r-- | bazarr/subtitles/download.py | 16 | ||||
-rw-r--r-- | bazarr/subtitles/manual.py | 5 |
2 files changed, 11 insertions, 10 deletions
diff --git a/bazarr/subtitles/download.py b/bazarr/subtitles/download.py index 063f2c47a..50562b91b 100644 --- a/bazarr/subtitles/download.py +++ b/bazarr/subtitles/download.py @@ -143,11 +143,13 @@ def _get_language_obj(languages): def _set_forced_providers(forced_required, pool): + # TODO: maybe a separate pool for forced configs? only_foreign is hardcoded + # in get_providers and this causes updating the pool on every call if forced_required: - pool.provider_configs['podnapisi']['only_foreign'] = True - pool.provider_configs['subscene']['only_foreign'] = True - pool.provider_configs['opensubtitles']['only_foreign'] = True - else: - pool.provider_configs['podnapisi']['only_foreign'] = False - pool.provider_configs['subscene']['only_foreign'] = False - pool.provider_configs['opensubtitles']['only_foreign'] = False + pool.provider_configs.update( + { + "podnapisi": {"only_foreign": True}, + "subscene": {"only_foreign": True}, + "opensubtitles": {"only_foreign": True} + } + ) diff --git a/bazarr/subtitles/manual.py b/bazarr/subtitles/manual.py index 49cf8bcbf..b8a1df056 100644 --- a/bazarr/subtitles/manual.py +++ b/bazarr/subtitles/manual.py @@ -56,10 +56,9 @@ def manual_search(path, profile_id, providers, sceneName, title, media_type): if language.forced: subscene_language_set.add(language) if len(subscene_language_set): - s_pool.provider_configs['subscene'] = {} - s_pool.provider_configs['subscene']['only_foreign'] = True + s_pool.provider_configs.update({"subscene": {"only_foreign": True}}) subtitles_subscene = list_all_subtitles([video], subscene_language_set, s_pool) - s_pool.provider_configs['subscene']['only_foreign'] = False + s_pool.provider_configs.update({"subscene": {"only_foreign": False}}) subtitles[video] += subtitles_subscene[video] else: subtitles = [] |