Only skip download if files exists; convert audio

This commit is contained in:
Philipp Hagemeister 2011-12-16 23:28:43 +01:00
parent ba5059dd66
commit a5647b79ce
1 changed files with 13 additions and 14 deletions

View File

@ -759,10 +759,6 @@ class FileDownloader(object):
if filename is None: if filename is None:
return return
if self.params.get('nooverwrites', False) and os.path.exists(filename):
self.to_stderr(u'WARNING: file exists and will be skipped')
return
try: try:
dn = os.path.dirname(filename) dn = os.path.dirname(filename)
if dn != '' and not os.path.exists(dn): if dn != '' and not os.path.exists(dn):
@ -804,6 +800,9 @@ class FileDownloader(object):
return return
if not self.params.get('skip_download', False): if not self.params.get('skip_download', False):
if self.params.get('nooverwrites', False) and os.path.exists(filename):
success = True
else:
try: try:
success = self._do_download(filename, info_dict) success = self._do_download(filename, info_dict)
except (OSError, IOError), err: except (OSError, IOError), err: