mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 04:04:15 +02:00
arch:using axel to pre-download source file | info window handling list attributes better
This commit is contained in:
21
bauh/api/abstract/download.py
Normal file
21
bauh/api/abstract/download.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from bauh.api.abstract.handler import ProcessWatcher
|
||||
|
||||
|
||||
class FileDownloader(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def download(self, file_url: str, watcher: ProcessWatcher, output_path: str, cwd: str) -> bool:
|
||||
"""
|
||||
:param file_url:
|
||||
:param watcher:
|
||||
:param output_path: the downloaded file output path. Leave None for the current directory and the same file name
|
||||
:param cwd: current working directory. Leave None if does not matter.
|
||||
:return: success / failure
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def is_multithreaded(self) -> bool:
|
||||
pass
|
||||
Reference in New Issue
Block a user