From 1f99e230fb65fea0f8f6684b9bb91b49cca05e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 16 Feb 2020 08:33:50 -0500 Subject: [PATCH] Fixes to broken manual search and download following @pannal changes to compute_score(). --- bazarr/get_subtitle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 8b078f439..50e755b92 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -349,7 +349,7 @@ def manual_search(path, language, hi, forced, providers, providers_auth, sceneNa releases = s.release_info.split(',') subtitles_list.append( - dict(score=round((score / max_score * 100), 2), + dict(score=round((score[0] / max_score * 100), 2), language=str(s.language), hearing_impaired=str(s.hearing_impaired), provider=s.provider_name, subtitle=codecs.encode(pickle.dumps(s.make_picklable()), "base64").decode(), @@ -399,7 +399,7 @@ def manual_download_subtitle(path, language, hi, forced, subtitle, provider, pro logging.exception('BAZARR No valid Subtitles file found for this file: ' + path) return try: - score = round(subtitle.score / max_score * 100, 2) + score = round(subtitle.score[0] / max_score * 100, 2) fld = get_target_folder(path) chmod = int(settings.general.chmod, 8) if not sys.platform.startswith( 'win') and settings.general.getboolean('chmod_enabled') else None