Add support for the new Downloaders to direct URLs

This commit is contained in:
rlaphoenix 2024-02-15 11:14:09 +00:00
parent a1ed083b74
commit e5a330df7e
1 changed files with 9 additions and 6 deletions

View File

@ -883,14 +883,17 @@ class dl:
if DOWNLOAD_LICENCE_ONLY.is_set(): if DOWNLOAD_LICENCE_ONLY.is_set():
progress(downloaded="[yellow]SKIPPED") progress(downloaded="[yellow]SKIPPED")
else: else:
downloader( for status_update in downloader(
uri=track.url, urls=track.url,
out=save_path, output_dir=save_path.parent,
filename=save_path.name,
headers=service.session.headers, headers=service.session.headers,
cookies=service.session.cookies, cookies=service.session.cookies,
proxy=proxy, proxy=proxy
progress=progress ):
) file_downloaded = status_update.get("file_downloaded")
if not file_downloaded:
progress(**status_update)
track.path = save_path track.path = save_path
if callable(track.OnDownloaded): if callable(track.OnDownloaded):