From d8cc4215f25898243812da64ec2c13d00dc8d466 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Tue, 17 Dec 2024 09:41:06 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Check=20if=20download=20was=20succe?= =?UTF-8?q?ssful=20before=20adding=20path=20to=20m3u=20creation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 6 ++++-- 1 file 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)