mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-21 13:37:34 +00:00
Add exception logging for compute_score().
This commit is contained in:
parent
3a0ca513d9
commit
0fac16c432
1 changed files with 95 additions and 90 deletions
|
@ -65,7 +65,12 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName,
|
|||
logging.exception("BAZARR Error trying to get subtitle list from provider for this file: " + path)
|
||||
else:
|
||||
subtitles_list = []
|
||||
try:
|
||||
sorted_subtitles = sorted([(s, compute_score(s, video, hearing_impaired=hi)) for s in subtitles], key=operator.itemgetter(1), reverse=True)
|
||||
except Exception as e:
|
||||
logging.exception('BAZARR Exception raised while trying to compute score for this file: ' + path)
|
||||
return None
|
||||
else:
|
||||
for s, preliminary_score in sorted_subtitles:
|
||||
if media_type == "movie":
|
||||
if (preliminary_score / max_score * 100) < int(minimum_score_movie):
|
||||
|
|
Loading…
Reference in a new issue