From d964dde4d51340ef05f92951d80d4bd7f70abc53 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Fri, 3 Mar 2023 02:49:13 +0000 Subject: [PATCH] Don't pre-allocate file-space for segmented downloads --- devine/core/downloaders/aria2c.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devine/core/downloaders/aria2c.py b/devine/core/downloaders/aria2c.py index 2cb735f..48254dc 100644 --- a/devine/core/downloaders/aria2c.py +++ b/devine/core/downloaders/aria2c.py @@ -62,7 +62,10 @@ def aria2c( "--max-tries", "5", "--max-file-not-found", "5", "--summary-interval", "0", - "--file-allocation", config.aria2c.get("file_allocation", "prealloc"), + "--file-allocation", [ + config.aria2c.get("file_allocation", "prealloc"), + "none" + ][segmented], "--console-log-level", "warn", "--download-result", ["hide", "default"][bool(progress)], *args,