mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
fix(naming): label AC-4 audio as AC4 in file names
This commit is contained in:
@@ -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` | 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_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` |
|
| `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` |
|
| `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` |
|
| `multi` | `MULTi` for more than two audio languages | `MULTi` |
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def test_layouts_without_heights_are_unchanged(layout: str | None, expected: str
|
|||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("fmt", "expected"),
|
("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:
|
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
|
assert named(fmt, "L R C LFE Ls Rs")["audio_full"] == expected
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ AUDIO_CODEC_MAP = {
|
|||||||
"E-AC-3": "DDP",
|
"E-AC-3": "DDP",
|
||||||
"DD+": "DDP", # Audio.Codec.EC3's value, which the REST API names a track by
|
"DD+": "DDP", # Audio.Codec.EC3's value, which the REST API names a track by
|
||||||
"AC-3": "DD",
|
"AC-3": "DD",
|
||||||
|
"AC-4": "AC4",
|
||||||
"DTS-UHD": "DTS-X",
|
"DTS-UHD": "DTS-X",
|
||||||
"DTS LBR": "DTS-LBR",
|
"DTS LBR": "DTS-LBR",
|
||||||
"MPEG-H 3D Audio": "MPEG-H",
|
"MPEG-H 3D Audio": "MPEG-H",
|
||||||
|
|||||||
Reference in New Issue
Block a user