mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: possible fix for pixel drain and torbox cancel download
This commit is contained in:
parent
c9ae543d3e
commit
6ea1f9034b
7 changed files with 31 additions and 25 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue