From e5a330df7ebb541ca11e4d7e9671bdafe030a98b Mon Sep 17 00:00:00 2001
From: rlaphoenix <rlaphoenix@pm.me>
Date: Thu, 15 Feb 2024 11:14:09 +0000
Subject: [PATCH] Add support for the new Downloaders to direct URLs

---
 devine/commands/dl.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/devine/commands/dl.py b/devine/commands/dl.py
index c3718a1..8c84e5c 100644
--- a/devine/commands/dl.py
+++ b/devine/commands/dl.py
@@ -883,14 +883,17 @@ class dl:
                     if DOWNLOAD_LICENCE_ONLY.is_set():
                         progress(downloaded="[yellow]SKIPPED")
                     else:
-                        downloader(
-                            uri=track.url,
-                            out=save_path,
+                        for status_update in downloader(
+                            urls=track.url,
+                            output_dir=save_path.parent,
+                            filename=save_path.name,
                             headers=service.session.headers,
                             cookies=service.session.cookies,
-                            proxy=proxy,
-                            progress=progress
-                        )
+                            proxy=proxy
+                        ):
+                            file_downloaded = status_update.get("file_downloaded")
+                            if not file_downloaded:
+                                progress(**status_update)
 
                         track.path = save_path
                         if callable(track.OnDownloaded):