fix: possible fix for pixel drain and torbox cancel download

This commit is contained in:
Zamitto 2024-12-25 23:15:58 -03:00
parent c9ae543d3e
commit 6ea1f9034b
7 changed files with 31 additions and 25 deletions

View file

@ -11,11 +11,12 @@ class HttpDownloader:
)
)
def start_download(self, url: str, save_path: str, header: str):
def start_download(self, url: str, save_path: str, header: str, out: str = None):
if self.download:
self.aria2.resume([self.download])
else:
downloads = self.aria2.add(url, options={"header": header, "dir": save_path})
downloads = self.aria2.add(url, options={"header": header, "dir": save_path, "out": out})
self.download = downloads[0]
def pause_download(self):