From 05d63d153e000b15908f0beaba7d4a7105406622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Dudzi=C5=84ski?= Date: Tue, 9 Jun 2026 20:39:43 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20`ac4`=20codecs=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- tiddl/cli/app.py | 2 +- tiddl/core/utils/parse.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b611c10..d03cbb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tiddl" -version = "3.4.3" +version = "3.4.4a1" description = "Download Tidal tracks with CLI downloader." readme = "README.md" requires-python = ">=3.13" diff --git a/tiddl/cli/app.py b/tiddl/cli/app.py index 20dde22..337505d 100644 --- a/tiddl/cli/app.py +++ b/tiddl/cli/app.py @@ -13,7 +13,7 @@ log = logging.getLogger("tiddl") app = typer.Typer(name="tiddl", no_args_is_help=True, rich_markup_mode="rich") register_commands(app) -VERSION = "v3.4.3" +VERSION = "v3.4.4a1" @app.callback() diff --git a/tiddl/core/utils/parse.py b/tiddl/core/utils/parse.py index 5575b9a..811dde1 100644 --- a/tiddl/core/utils/parse.py +++ b/tiddl/core/utils/parse.py @@ -6,6 +6,8 @@ from xml.etree.ElementTree import fromstring from tiddl.core.api.models import TrackStream, VideoStream +DOLBY_CODECS = ["eac3", "ac4"] + def parse_manifest_XML(xml_content: str): """ @@ -80,7 +82,7 @@ def parse_track_stream(track_stream: TrackStream) -> tuple[list[str], str]: file_extension = ".flac" if track_stream.audioQuality == "HI_RES_LOSSLESS": file_extension = ".m4a" - elif codecs.startswith("mp4") or codecs == "eac3": + elif codecs.startswith("mp4") or codecs in DOLBY_CODECS: file_extension = ".m4a" else: raise ValueError(f"Unknown codecs `{codecs}` (trackId {track_stream.trackId}")