Added Dolby Atmos support (needs testing) (#348)

* add dolby atmos support

* 🚀 Bump version to 3.4.0a5
This commit is contained in:
Oskar Dudziński
2026-04-30 01:14:32 +02:00
committed by GitHub
parent 9abf141411
commit 6b82c40fae
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "tiddl" name = "tiddl"
version = "3.4.0a4" version = "3.4.0a5"
description = "Download Tidal tracks with CLI downloader." description = "Download Tidal tracks with CLI downloader."
readme = "README.md" readme = "README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
@@ -159,6 +159,8 @@ class Downloader:
if stream.audioQuality in ["HI_RES_LOSSLESS", "LOSSLESS"]: if stream.audioQuality in ["HI_RES_LOSSLESS", "LOSSLESS"]:
quality = f"{quality} {stream.bitDepth}-bit, {(stream.sampleRate or 0) / 1000:.1f} kHz" quality = f"{quality} {stream.bitDepth}-bit, {(stream.sampleRate or 0) / 1000:.1f} kHz"
should_extract_flac = True should_extract_flac = True
else:
download_path = download_path.with_suffix(".m4a")
elif isinstance(item, Video): elif isinstance(item, Video):
stream = self.api.get_video_stream( stream = self.api.get_video_stream(
+1 -1
View File
@@ -124,7 +124,7 @@ class Favorites(BaseModel):
class TrackStream(BaseModel): class TrackStream(BaseModel):
trackId: int trackId: int
assetPresentation: Literal["FULL"] assetPresentation: Literal["FULL"]
audioMode: Literal["STEREO"] audioMode: Literal["STEREO", "DOLBY_ATMOS"]
audioQuality: TrackQuality audioQuality: TrackQuality
manifestMimeType: Literal["application/dash+xml", "application/vnd.tidal.bts"] manifestMimeType: Literal["application/dash+xml", "application/vnd.tidal.bts"]
manifestHash: str manifestHash: str
+1 -1
View File
@@ -80,7 +80,7 @@ def parse_track_stream(track_stream: TrackStream) -> tuple[list[str], str]:
file_extension = ".flac" file_extension = ".flac"
if track_stream.audioQuality == "HI_RES_LOSSLESS": if track_stream.audioQuality == "HI_RES_LOSSLESS":
file_extension = ".m4a" file_extension = ".m4a"
elif codecs.startswith("mp4"): elif codecs.startswith("mp4") or codecs == "eac3":
file_extension = ".m4a" file_extension = ".m4a"
else: else:
raise ValueError(f"Unknown codecs `{codecs}` (trackId {track_stream.trackId}") raise ValueError(f"Unknown codecs `{codecs}` (trackId {track_stream.trackId}")