diff --git a/docs/guide/output-and-naming.md b/docs/guide/output-and-naming.md index 03b885f5..87dbf094 100644 --- a/docs/guide/output-and-naming.md +++ b/docs/guide/output-and-naming.md @@ -202,7 +202,7 @@ A `sports` folder template groups by `{year}`, or by the air year when the event |---|---|---| | `audio` | Audio codec; rename it with [`codec_names`](../reference/configuration/output.md#codec_names) | `DDP`, `DD`, `AAC`, `DTS-X` | | `audio_channels` | Channel layout; bed.LFE.heights when the track has height channels | `5.1`, `2.0`, `5.1.4` | -| `audio_full` | Codec + channels combined; a name that ends in a digit gets a separator | `DDP5.1`, `DTS-X.5.1.4`, `AC-4.2.0` | +| `audio_full` | Codec + channels combined; a name that ends in a digit gets a separator | `DDP5.1`, `DTS-X.5.1.4`, `AC4.2.0` | | `atmos` | `Atmos` when an audio track in the file carries JOC or is marked Atmos, as in the `--list` row (MediaInfo shows no JOC for AC-4) | `Atmos` | | `dual` | `DUAL` for two audio languages (see [`dual_multi_mode`](../reference/configuration/download.md#dual_multi_mode)) | `DUAL` | | `multi` | `MULTi` for more than two audio languages | `MULTi` | diff --git a/tests/core/test_audio_channel_naming.py b/tests/core/test_audio_channel_naming.py index e517e367..f29aaba2 100644 --- a/tests/core/test_audio_channel_naming.py +++ b/tests/core/test_audio_channel_naming.py @@ -56,7 +56,7 @@ def test_layouts_without_heights_are_unchanged(layout: str | None, expected: str @pytest.mark.parametrize( ("fmt", "expected"), - [("E-AC-3", "DDP5.1"), ("AC-3", "DD5.1"), ("AC-4", "AC-4 5.1"), ("AAC", "AAC5.1")], + [("E-AC-3", "DDP5.1"), ("AC-3", "DD5.1"), ("AC-4", "AC4 5.1"), ("AAC", "AAC5.1")], ) def test_a_name_ending_in_a_digit_is_spaced_from_the_channels(fmt: str, expected: str) -> None: assert named(fmt, "L R C LFE Ls Rs")["audio_full"] == expected diff --git a/unshackle/core/constants.py b/unshackle/core/constants.py index 6d7057d0..57416665 100644 --- a/unshackle/core/constants.py +++ b/unshackle/core/constants.py @@ -46,6 +46,7 @@ AUDIO_CODEC_MAP = { "E-AC-3": "DDP", "DD+": "DDP", # Audio.Codec.EC3's value, which the REST API names a track by "AC-3": "DD", + "AC-4": "AC4", "DTS-UHD": "DTS-X", "DTS LBR": "DTS-LBR", "MPEG-H 3D Audio": "MPEG-H",