Fix output directory and filename for single-URL aria2c downloads

This commit is contained in:
rlaphoenix 2024-01-17 04:49:37 +00:00
parent 746c55d188
commit 26d067915f
1 changed files with 3 additions and 3 deletions

View File

@ -54,11 +54,11 @@ async def aria2c(
for i, url in enumerate(uri):
url_text = url
if multiple_urls:
url_text += f"\n\tdir={out.parent}"
url_text += f"\n\tout={out.name}"
else:
url_text += f"\n\tdir={out}"
url_text += f"\n\tout={i:08}.mp4"
else:
url_text += f"\n\tdir={out.parent}"
url_text += f"\n\tout={out.name}"
if cookies:
mock_request = requests.Request(url=url)
cookie_header = get_cookie_header(cookies, mock_request)