mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 21:15:06 +00:00
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:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user