summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2009-09-20 00:11:11 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:24:56 +0100
commit850ab76560f7a7b9274dd382cf3a5a75a7bb3c8d (patch)
tree0b39d126261dacdeaf39cce6389e8f1d733c9636
parentf5a5bec35145bad8ecba149b65254bb0cfa70b78 (diff)
downloadyoutube-dl-850ab76560f7a7b9274dd382cf3a5a75a7bb3c8d.tar.gz
youtube-dl-850ab76560f7a7b9274dd382cf3a5a75a7bb3c8d.tar.xz
youtube-dl-850ab76560f7a7b9274dd382cf3a5a75a7bb3c8d.zip
Use default values for "continuedl" and "nooverwrites" downloader parameters
-rwxr-xr-xyoutube-dl4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube-dl b/youtube-dl
index 047cc37f8..03609e22c 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -327,7 +327,7 @@ class FileDownloader(object):
 			filename = self.params['outtmpl'] % template_dict
 		except (ValueError, KeyError), 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)
 			return
 
@@ -402,7 +402,7 @@ class FileDownloader(object):
 			resume_len = os.path.getsize(filename)
 		else:
 			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)
 			request.add_header('Range','bytes=%d-' % resume_len)