summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/model
diff options
context:
space:
mode:
authorexislow <exislow@users.noreply.github.com>2024-11-12 22:15:44 +0100
committerGitHub <noreply@github.com>2024-11-12 22:15:44 +0100
commit4e5b4ff4bc3aad1b70d03278aff81e0f3260a2b1 (patch)
tree3d24f4fabdd585bc131ecc4cdaa80038c245768b /tidal_dl_ng/model
parent4cef07b08f16410f56fa53a34884ce3b5dd6b64e (diff)
parent78a48348a8986f0044fbce2097ad3e099258d32d (diff)
downloadtidal-dl-ng-4e5b4ff4bc3aad1b70d03278aff81e0f3260a2b1.tar.gz
Merge pull request #227 from exislow/multithread-track
✨ Track segments are downloaded simultaneously, which results in a hu…
Diffstat (limited to 'tidal_dl_ng/model')
-rw-r--r--tidal_dl_ng/model/cfg.py2
-rw-r--r--tidal_dl_ng/model/downloader.py9
2 files changed, 11 insertions, 0 deletions
diff --git a/tidal_dl_ng/model/cfg.py b/tidal_dl_ng/model/cfg.py
index fae3590..6e9b991 100644
--- a/tidal_dl_ng/model/cfg.py
+++ b/tidal_dl_ng/model/cfg.py
@@ -37,6 +37,7 @@ class Settings:
metadata_cover_embed: bool = True
cover_album_file: bool = True
extract_flac: bool = True
+ downloads_simultaneous_per_track_max: int = 20
@dataclass_json
@@ -82,6 +83,7 @@ class HelpSettings:
metadata_cover_embed: str = "Embed album cover into file."
cover_album_file: str = "Save cover to 'cover.jpg', if an album is downloaded."
extract_flac: str = "Extract FLAC audio tracks from MP4 containers and save them as `*.flac` (uses FFmpeg)."
+ downloads_simultaneous_per_track_max: str = "Maximum number of simultaneous chunk downloads per track."
@dataclass_json
diff --git a/tidal_dl_ng/model/downloader.py b/tidal_dl_ng/model/downloader.py
new file mode 100644
index 0000000..b8c5348
--- /dev/null
+++ b/tidal_dl_ng/model/downloader.py
@@ -0,0 +1,9 @@
+import pathlib
+from dataclasses import dataclass
+
+
+@dataclass
+class DownloadSegmentResult:
+ result: bool
+ url: str
+ path_segment: pathlib.Path