fix(naming): correct language tag rule matching and add state conditions

Rules took only a scalar, so the documented list syntax raised LanguageTagError after the mux. Normalise every condition, treat an invalid tag as no match, guard the surrounding post-mux config reads, and let a rule match dual, multi and dubbed so a release can carry its own tag.
This commit is contained in:
imSp4rky
2026-09-11 20:00:08 -06:00
parent f43b90d6b6
commit c8a674d85d
9 changed files with 207 additions and 18 deletions
+7
View File
@@ -118,3 +118,10 @@ def test_count_never_dubbed(count_mode):
assert c["dubbed"] == ""
assert c["dual"] == ""
assert c["multi"] == ""
def test_a_missing_template_key_falls_back_instead_of_raising(monkeypatch):
"""dl only checks output_template is non-empty, so the title's own key can be absent."""
monkeypatch.setattr(config, "output_template", {"series": "{title}"})
name = make_movie("en").get_filename(make_media_info(["en"]))
assert name == "The Film (2024)"