Fixed: aria2c downloading files

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2018-04-29 12:17:26 +02:00
parent 3a74c40996
commit c8b85971c9
2 changed files with 8 additions and 3 deletions

View file

@ -98,8 +98,8 @@ DOWNDER=wget
# Downloader [OPTION]. Pass downloader options, for curl use "-L -o" as
# using to download in specific directory and support any redirects
# such as from sourceforge repository. No extra option need for aria2c
# by default to work. Http recommended "-d -c -o" options by default.
# such as from sourceforge repository. aria2c recommended "--allow-overwrite"
# options by default. Http recommended "-d -c -o" options by default.
# Default for wget is "-c -N".
DOWNDER_OPTIONS=-c -N

View file

@ -65,11 +65,16 @@ class Download(object):
dwn_count, len(self.url), self.meta.color["GREEN"],
self.meta.color["ENDC"],
self.file_name))
if self.downder in ["wget", "aria2c"]:
if self.downder in ["wget"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,
self.dir_prefix, self.path, dwn),
shell=True)
if self.downder in ["aria2c"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,
self.dir_prefix, self.path[:-1], dwn),
shell=True)
elif self.downder in ["curl", "http"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,