mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-24 08:43:01 +00:00
Avoid breaking function with optional keyword parameter
This commit is contained in:
parent
4b8f0dbe81
commit
e1386aedc0
1 changed files with 7 additions and 4 deletions
|
@ -49,8 +49,11 @@ def compute_score(matches, subtitle, video, hearing_impaired=None, score_obj=Non
|
||||||
"""
|
"""
|
||||||
logger.info('%r: Computing score for video %r with %r', subtitle, video, dict(hearing_impaired=hearing_impaired))
|
logger.info('%r: Computing score for video %r with %r', subtitle, video, dict(hearing_impaired=hearing_impaired))
|
||||||
|
|
||||||
scores = score_obj.scores or get_scores(video)
|
if score_obj is not None:
|
||||||
|
scores = score_obj.scores
|
||||||
score_obj.check_custom_profiles(subtitle, matches)
|
score_obj.check_custom_profiles(subtitle, matches)
|
||||||
|
else:
|
||||||
|
scores = get_scores(video)
|
||||||
|
|
||||||
is_episode = isinstance(video, Episode)
|
is_episode = isinstance(video, Episode)
|
||||||
is_movie = isinstance(video, Movie)
|
is_movie = isinstance(video, Movie)
|
||||||
|
|
Loading…
Reference in a new issue