From c54985aa914ef6f83a21ec886964842f28279cd0 Mon Sep 17 00:00:00 2001 From: Crend King <975235+CrendKing@users.noreply.github.com> Date: Wed, 16 Sep 2020 14:46:26 -0700 Subject: [PATCH 1/3] Remove the continue argument to aria2c when --no-continue is specified --- youtube_dl/downloader/external.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index c31f8910a..67c3da4d4 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -182,7 +182,8 @@ class Aria2cFD(ExternalFD): AVAILABLE_OPT = '-v' def _make_cmd(self, tmpfilename, info_dict): - cmd = [self.exe, '-c'] + cmd = [self.exe] + cmd += self._valueless_option('-c', 'continuedl') cmd += self._configuration_args([ '--min-split-size', '1M', '--max-connection-per-server', '4']) dn = os.path.dirname(tmpfilename) From 9b76e517aaafc3584a44290a98bf66830b8cacb6 Mon Sep 17 00:00:00 2001 From: Crend King <975235+CrendKing@users.noreply.github.com> Date: Thu, 17 Sep 2020 15:59:47 -0700 Subject: [PATCH 2/3] Use the full flag notation --- youtube_dl/downloader/external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 67c3da4d4..3d5e08234 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -183,7 +183,7 @@ class Aria2cFD(ExternalFD): def _make_cmd(self, tmpfilename, info_dict): cmd = [self.exe] - cmd += self._valueless_option('-c', 'continuedl') + cmd += self._bool_option('--continue', 'continuedl', separator='=') cmd += self._configuration_args([ '--min-split-size', '1M', '--max-connection-per-server', '4']) dn = os.path.dirname(tmpfilename) From 7cf7d4d7c5bfc6345a524871bf05015627951792 Mon Sep 17 00:00:00 2001 From: Crend King <975235+CrendKing@users.noreply.github.com> Date: Sat, 19 Sep 2020 22:47:27 -0700 Subject: [PATCH 3/3] Also pass "allow-overwrite" and "remove-control-file" options at beginning --- youtube_dl/downloader/external.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 3d5e08234..4177fd3af 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -184,6 +184,8 @@ class Aria2cFD(ExternalFD): def _make_cmd(self, tmpfilename, info_dict): cmd = [self.exe] cmd += self._bool_option('--continue', 'continuedl', separator='=') + cmd += self._bool_option('--allow-overwrite', 'continuedl', 'false', 'true', separator='=') + cmd += self._bool_option('--remove-control-file', 'continuedl', 'false', 'true', separator='=') cmd += self._configuration_args([ '--min-split-size', '1M', '--max-connection-per-server', '4']) dn = os.path.dirname(tmpfilename)