|
|
@ -397,7 +397,7 @@ def manual_download_subtitle(path, language, hi, subtitle, provider, providers_a
|
|
|
|
if video:
|
|
|
|
if video:
|
|
|
|
min_score, max_score, scores = get_scores(video, media_type)
|
|
|
|
min_score, max_score, scores = get_scores(video, media_type)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
download_subtitles([subtitle], providers={provider}, provider_configs=providers_auth,
|
|
|
|
download_success = download_subtitles([subtitle], providers={provider}, provider_configs=providers_auth,
|
|
|
|
pool_class=SZAsyncProviderPool,
|
|
|
|
pool_class=SZAsyncProviderPool,
|
|
|
|
throttle_callback=None) # fixme
|
|
|
|
throttle_callback=None) # fixme
|
|
|
|
logging.debug('BAZARR Subtitles file downloaded for this file:' + path)
|
|
|
|
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)
|
|
|
|
logging.exception('BAZARR Error downloading subtitles for this file ' + path)
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
if not download_success:
|
|
|
|
|
|
|
|
logging.exception('BAZARR Error downloading subtitles for this file ' + path)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
score = round(subtitle.score / max_score * 100, 2)
|
|
|
|
score = round(subtitle.score / max_score * 100, 2)
|
|
|
|
saved_subtitles = save_subtitles(video.name, [subtitle], single=single,
|
|
|
|
saved_subtitles = save_subtitles(video.name, [subtitle], single=single,
|
|
|
|