diff options
Diffstat (limited to 'yum-fast-downloader.py')
-rw-r--r-- | yum-fast-downloader.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yum-fast-downloader.py b/yum-fast-downloader.py index 65e9072..d3aa9cb 100644 --- a/yum-fast-downloader.py +++ b/yum-fast-downloader.py @@ -37,14 +37,15 @@ originalRetrieveMD = YumRepository._retrieveMD downloader_app = '' global_cache_dir='' downloader_common_args = { - 'aria2c' : ["aria2c", "--continue", "--check-certificate=false"] + 'aria2c' : ["aria2c", "--continue", "--check-certificate=false", + "--on-download-complete=/usr/libexec/yum-fast-downloader-finalize"] } # downloader functions def _getAria2CArgs(urls, remote_path, local_path, proxies = None): args = downloader_common_args['aria2c'] - args.append("--out={0}".format(os.path.basename(local_path))) + args.append("--out={0}.yfd".format(os.path.basename(local_path))) args.append("--dir={0}".format(os.path.dirname(local_path))) args.append("--split={0}".format(max(5, len(urls)))) if proxies: @@ -70,7 +71,7 @@ def queueDownload(inputFile, urls, remote_path, local_path, proxies = None): for url in urls: inputFile.write(url + remote_path + "\t") inputFile.write("\n") - inputFile.write(" out={0}\n".format(os.path.basename(local_path))) + inputFile.write(" out={0}.yfd\n".format(os.path.basename(local_path))) inputFile.write(" dir={0}\n".format(os.path.dirname(local_path))) inputFile.write(" split={0}\n".format(max(5, len(urls)))) |