summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2024-12-17 09:41:06 +0100
committerRobert Honz <exislow+github@gmail.com>2024-12-17 09:41:06 +0100
commitd8cc4215f25898243812da64ec2c13d00dc8d466 (patch)
treee8685b6dd4aa904a7454c8828d3d49a61b6af651
parent3897daedf1bddd47c09bbd95c16988b506f4db8b (diff)
downloadtidal-dl-ng-d8cc4215f25898243812da64ec2c13d00dc8d466.tar.gz
✨ Check if download was successful before adding path to m3u creation.
-rw-r--r--tidal_dl_ng/download.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py
index c367b97..0807a1a 100644
--- a/tidal_dl_ng/download.py
+++ b/tidal_dl_ng/download.py
@@ -285,7 +285,7 @@ class Download:
quality_audio: Quality | None = None,
quality_video: QualityVideo | None = None,
is_parent_album: bool = False,
- ) -> (bool, str):
+ ) -> (bool, pathlib.Path):
try:
if media_id and media_type:
# If no media instance is provided, we need to create the media instance.
@@ -710,7 +710,9 @@ class Download:
for future in futures.as_completed(l_futures):
# Retrieve result
status, result_path_file = future.result()
- result_dirs.append(result_path_file.parent)
+
+ if status:
+ result_dirs.append(result_path_file.parent)
# Advance progress bar.
self.progress.advance(p_task1)