From 4ac6690efc5a0a2a97fb42530453746e53c24cfa Mon Sep 17 00:00:00 2001 From: panni Date: Thu, 29 Nov 2018 15:08:36 +0100 Subject: [PATCH] get_subtitle: manual download: add separate check for download success --- bazarr/get_subtitle.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 433fee9d1..27f43936a 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -397,14 +397,16 @@ 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_subtitles([subtitle], providers={provider}, provider_configs=providers_auth, - pool_class=SZAsyncProviderPool, - throttle_callback=None) # fixme + download_success = 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) except Exception as e: logging.exception('BAZARR Error downloading subtitles for this file ' + path) return None else: + if not download_success: + logging.exception('BAZARR Error downloading subtitles for this file ' + path) try: score = round(subtitle.score / max_score * 100, 2) saved_subtitles = save_subtitles(video.name, [subtitle], single=single,