From 768ca6db9cbf35167efb96d3e0254b176aa01989 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 6 Oct 2025 13:36:29 +0200 Subject: [PATCH] =?UTF-8?q?fix(download):=20=F0=9F=90=9B=20handle=20empty?= =?UTF-8?q?=20items=20list=20in=20download=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added a check for empty `items` list to mark progress as complete. * Ensured GUI updates correctly reflect progress for empty downloads. --- tidal_dl_ng/download.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: