get_subtitle: manual download: add separate check for download success

pull/292/head
panni 6 years ago
parent 80ee0c9299
commit 4ac6690efc

@ -397,7 +397,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_subtitles([subtitle], providers={provider}, provider_configs=providers_auth,
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)
@ -405,6 +405,8 @@ 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:
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,

Loading…
Cancel
Save