feat(naming): add audio_contain_all language tag condition

An empty audio_contain_all or subs_contain_all list now never matches; before this, an empty subs_contain_all list matched every release.
This commit is contained in:
imSp4rky
2026-10-29 14:41:06 -06:00
parent bd64f3a8c4
commit d4abcb51d9
5 changed files with 64 additions and 25 deletions
+6
View File
@@ -26,6 +26,8 @@ language_tags:
rules:
- audio: no
tag: NORDIC
- audio_contain_all: [no, da]
tag: NORDIC2
update_checks: no
"""
@@ -57,6 +59,10 @@ def test_a_no_rule_tags_a_norwegian_track(tmp_path: Path) -> None:
assert evaluate_language_tag(rules, [Language.get("no")], []) == "NORDIC"
def test_a_no_entry_survives_in_an_audio_contain_all_list(tmp_path: Path) -> None:
assert _load(tmp_path).language_tags["rules"][1]["audio_contain_all"] == ["no", "da"]
def test_tag_rules_keep_their_own_booleans(tmp_path: Path) -> None:
"""tag_rules matches text and warns about a bare bool itself."""
path = tmp_path / "unshackle.yaml"