feat(tracks): add muxing.track_names none to leave unnamed tracks unnamed

A track the service gives no name keeps none (--list shows [VTT] | en); SDH, CC, Forced and Descriptive labels still apply.
This commit is contained in:
imSp4rky
2026-10-24 21:24:31 -06:00
parent 7832c4dbe4
commit 80bda08f36
5 changed files with 23 additions and 4 deletions
+10
View File
@@ -107,6 +107,16 @@ def test_native_subtitle_name_keeps_the_flag(monkeypatch: pytest.MonkeyPatch) ->
assert sub("zh", name="Mandarin").get_track_name() == "Mandarin"
def test_no_language_name_when_track_names_is_none(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(config, "muxing", {"track_names": "none"})
assert sub("en").get_track_name() is None
assert sub("en", sdh=True).get_track_name() == "SDH"
assert sub("en", name="English [Full]").get_track_name() == "English [Full]"
video = Video(id_="v", url="https://x/v", codec=Video.Codec.AVC, language="en")
video.data["audio_language"] = "en"
assert video.embedded_audio_name() == ""
def test_subtitle_names_and_tags_the_script_but_keeps_its_language() -> None:
track = sub("zh-TW")
assert track.name is None