Private GIT

Skip to content
Snippets Groups Projects
Commit a428e939 authored by Dario's avatar Dario
Browse files

Merge pull request #365 from fernandog/subs_min_score

Adds min_score to subtitle download/picker
parents 80072794 f70e83e4
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,12 @@ def download_subtitles(subtitles_info):
subtitles_info['episode']), logger.DEBUG)
return (existing_subtitles, None)
found_subtitles = pool.download_best_subtitles(subtitles_list, video, languages=languages,
for sub in subtitles_list:
matches = sub.get_matches(video, hearing_impaired=False)
score = subliminal.subtitle.compute_score(matches, video)
logger.log(u"[%s] Subtitle score for %s is: %s (min=132)" % (sub.provider_name, sub.id, score), logger.DEBUG)
found_subtitles = pool.download_best_subtitles(subtitles_list, video, languages=languages, min_score=132,
hearing_impaired=sickbeard.SUBTITLES_HEARING_IMPAIRED,
only_one=not sickbeard.SUBTITLES_MULTI)
......@@ -341,9 +346,14 @@ class SubtitlesFinder(object):
hearing_impaired = sickbeard.SUBTITLES_HEARING_IMPAIRED
found_subtitles = pool.download_best_subtitles(subtitles_list, video, languages=languages,
hearing_impaired=hearing_impaired,
hearing_impaired=hearing_impaired, min_score=132,
only_one=not sickbeard.SUBTITLES_MULTI)
for sub in subtitles_list:
matches = sub.get_matches(video, hearing_impaired=False)
score = subliminal.subtitle.compute_score(matches, video)
logger.log(u"[%s] Subtitle score for %s is: %s (min=132)" % (sub.provider_name, sub.id, score), logger.DEBUG)
downloaded_languages = set()
for subtitle in found_subtitles:
logger.log(u"Found subtitle for %s in %s provider with language %s"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment