Compare commits

...

2 Commits

Author SHA1 Message Date
tcely
565999e58a
Remove stderr changes 2024-12-25 03:29:35 -05:00
tcely
670da95bac
Move required flags below _configuration_args()
- Resume or overwrite the specified file
- Do not rename output to a non-existent file
- Do not abort the transfer when resume fails
- Do not preserve the control file after transfers complete
2024-12-25 03:24:07 -05:00

View File

@ -269,7 +269,6 @@ class WgetFD(ExternalFD):
class Aria2cFD(ExternalFD):
AVAILABLE_OPT = '-v'
SUPPORTED_PROTOCOLS = ('http', 'https', 'ftp', 'ftps', 'dash_frag_urls', 'm3u8_frag_urls')
_CAPTURE_STDERR = False
@staticmethod
def supports_manifest(manifest):
@ -294,9 +293,7 @@ class Aria2cFD(ExternalFD):
return super()._call_downloader(tmpfilename, info_dict)
def _make_cmd(self, tmpfilename, info_dict):
cmd = [self.exe, '--no-conf', '--stderr=true',
'--auto-save-interval=10', '--allow-overwrite=true', '--always-resume=false',
'--auto-file-renaming=false', '--force-save=false',
cmd = [self.exe, '--no-conf', '--auto-save-interval=10',
'--console-log-level=warn', '--summary-interval=0', '--download-result=hide',
'--http-accept-gzip=true', '--file-allocation=none', '-x16', '-j16', '-s16']
if 'fragments' in info_dict:
@ -317,6 +314,11 @@ class Aria2cFD(ExternalFD):
cmd += self._bool_option('--show-console-readout', 'noprogress', 'false', 'true', '=')
cmd += self._bool_option('--remove-control-file', 'continuedl', 'false', 'true', '=')
cmd += self._configuration_args()
# do not allow changing these flags
cmd += ['--allow-overwrite=true']
cmd += ['--always-resume=false']
cmd += ['--auto-file-renaming=false']
cmd += ['--force-save=false']
if '__rpc' in info_dict:
cmd += [