mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-22 15:54:26 +00:00
708fbfcd8e
Currently only configurable via manual `data/config/config.ini` text edition. New configurable values are `series_scores` and `movie_scores`. For each config section, the sum of the config values (except hash) must be equal to the hash value plus one (1), otherwise default values will be used (notified via debug log). Hash values are not meant to be modified; the value is shown in `config.ini` for reference. Modifying hash values would imply breaking Bazarr's score logic.
29 lines
866 B
Python
29 lines
866 B
Python
from subliminal_patch import subtitle
|
|
|
|
|
|
def test_guess_matches_w_edition_only_video(movies):
|
|
movie = movies["dune"]
|
|
movie.edition = "Director's Cut"
|
|
matches = subtitle.guess_matches(movie, {})
|
|
assert "edition" not in matches
|
|
|
|
|
|
def test_guess_matches_w_edition_only_guess(movies):
|
|
movie = movies["dune"]
|
|
movie.edition = None
|
|
matches = subtitle.guess_matches(movie, {"edition": "Director's Cut"})
|
|
assert "edition" not in matches
|
|
|
|
|
|
def test_guess_matches_w_edition_both(movies):
|
|
movie = movies["dune"]
|
|
movie.edition = "Director's Cut"
|
|
matches = subtitle.guess_matches(movie, {"edition": "Director's Cut"})
|
|
assert "edition" in matches
|
|
|
|
|
|
def test_guess_matches_w_edition_both_empty(movies):
|
|
movie = movies["dune"]
|
|
movie.edition = None
|
|
matches = subtitle.guess_matches(movie, {})
|
|
assert "edition" in matches
|