1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-01-18 23:03:05 +01:00

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
This commit is contained in:
tcely 2024-12-25 03:24:07 -05:00 committed by GitHub
parent 087cb24bb2
commit 670da95bac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -294,9 +294,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', '--stderr=true', '--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 +315,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 += [