Score¶
This module provides the default implementation of the compute_score parameter in
download_best_subtitles()
and download_best_subtitles()
.
Note
To avoid unnecessary dependency on sympy and boost subliminal’s import time, the resulting scores are hardcoded here and manually updated when the set of equations change.
Available matches:
hash
title
year
series
season
episode
release_group
format
audio_codec
resolution
hearing_impaired
video_codec
series_imdb_id
imdb_id
tvdb_id
-
subliminal.score.
episode_scores
= {'audio_codec': 3, 'episode': 30, 'format': 7, 'hash': 359, 'hearing_impaired': 1, 'release_group': 15, 'resolution': 2, 'season': 30, 'series': 180, 'video_codec': 2, 'year': 90}¶ Scores for episodes
-
subliminal.score.
movie_scores
= {'audio_codec': 3, 'format': 7, 'hash': 119, 'hearing_impaired': 1, 'release_group': 15, 'resolution': 2, 'title': 60, 'video_codec': 2, 'year': 30}¶ Scores for movies
-
subliminal.score.
equivalent_release_groups
= ({'DIMENSION', 'LOL'}, {'ASAP', 'IMMERSE', 'FLEET'})¶ Equivalent release groups
-
subliminal.score.
get_equivalent_release_groups
(release_group)[source]¶ Get all the equivalents of the given release group.
-
subliminal.score.
get_scores
(video)[source]¶ Get the scores dict for the given video.
This will return either
episode_scores
ormovie_scores
based on the type of the video.
-
subliminal.score.
compute_score
(subtitle, video, hearing_impaired=None)[source]¶ Compute the score of the subtitle against the video with hearing_impaired preference.
compute_score()
uses theSubtitle.get_matches
method and applies the scores (either fromepisode_scores
ormovie_scores
) after some processing.