mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Use default values for "continuedl" and "nooverwrites" downloader parameters
This commit is contained in:
parent
f5a5bec351
commit
850ab76560
1 changed files with 2 additions and 2 deletions
|
@ -327,7 +327,7 @@ class FileDownloader(object):
|
||||||
filename = self.params['outtmpl'] % template_dict
|
filename = self.params['outtmpl'] % template_dict
|
||||||
except (ValueError, KeyError), err:
|
except (ValueError, KeyError), err:
|
||||||
self.trouble('ERROR: invalid output template or system charset: %s' % str(err))
|
self.trouble('ERROR: invalid output template or system charset: %s' % str(err))
|
||||||
if self.params['nooverwrites'] and os.path.exists(filename):
|
if self.params.get('nooverwrites', False) and os.path.exists(filename):
|
||||||
self.to_stderr(u'WARNING: file exists: %s; skipping' % filename)
|
self.to_stderr(u'WARNING: file exists: %s; skipping' % filename)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ class FileDownloader(object):
|
||||||
resume_len = os.path.getsize(filename)
|
resume_len = os.path.getsize(filename)
|
||||||
else:
|
else:
|
||||||
resume_len = 0
|
resume_len = 0
|
||||||
if self.params['continuedl'] and resume_len != 0:
|
if self.params.get('continuedl', False) and resume_len != 0:
|
||||||
self.report_resuming_byte(resume_len)
|
self.report_resuming_byte(resume_len)
|
||||||
request.add_header('Range','bytes=%d-' % resume_len)
|
request.add_header('Range','bytes=%d-' % resume_len)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue