summaryrefslogtreecommitdiff
path: root/tidal_dl_ng
diff options
context:
space:
mode:
authorexislow <exislow@users.noreply.github.com>2025-10-06 13:37:14 +0200
committerGitHub <noreply@github.com>2025-10-06 13:37:14 +0200
commit3c9ba3fc30bbe87d11b7053f32adce18c183101c (patch)
tree402017012c57004da8acbf5a0cd00e317d97a454 /tidal_dl_ng
parenta35a89a8232b86f614004e8404790e4f81b75479 (diff)
parent768ca6db9cbf35167efb96d3e0254b176aa01989 (diff)
downloadtidal-dl-ng-3c9ba3fc30bbe87d11b7053f32adce18c183101c.tar.gz
Merge pull request #563 from exislow/437-album-with-zero-tracks-causes-hang
fix(download): 🐛 handle empty items list in download process
Diffstat (limited to 'tidal_dl_ng')
-rw-r--r--tidal_dl_ng/download.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py
index f02e096..8ca70c1 100644
--- a/tidal_dl_ng/download.py
+++ b/tidal_dl_ng/download.py
@@ -1366,6 +1366,16 @@ class Download:
"""
result_dirs: list[pathlib.Path] = []
+ # Check if items list is empty
+ if not items:
+ # Mark progress as complete for empty lists
+ progress.update(progress_task, completed=progress.tasks[progress_task].total)
+
+ if not progress_stdout and self.progress_gui:
+ self.progress_gui.list_item.emit(100.0)
+
+ return result_dirs
+
# Iterate through list items
while not progress.finished:
with futures.ThreadPoolExecutor(max_workers=self.settings.data.downloads_concurrent_max) as executor: