From ab60b9276bd82952aa466a8568fef0e416903436 Mon Sep 17 00:00:00 2001 From: panni Date: Tue, 15 Jan 2019 13:20:39 +0100 Subject: [PATCH] manual_download_subtitle: fix download success handling --- bazarr/get_subtitle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 5e93f7e37..fb58eadfa 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -399,7 +399,7 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a if video: min_score, max_score, scores = get_scores(video, media_type) try: - download_success = download_subtitles([subtitle], providers={provider}, provider_configs=providers_auth, + download_subtitles([subtitle], providers={provider}, provider_configs=providers_auth, pool_class=SZAsyncProviderPool, throttle_callback=None) # fixme logging.debug('BAZARR Subtitles file downloaded for this file:' + path) @@ -407,8 +407,9 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a logging.exception('BAZARR Error downloading subtitles for this file ' + path) return None else: - if not download_success: + if not subtitle.is_valid(): logging.exception('BAZARR Error downloading subtitles for this file ' + path) + return try: score = round(subtitle.score / max_score * 100, 2) saved_subtitles = save_subtitles(video.name, [subtitle], single=single,