Don't download all the video parts if the final video exists

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-05 11:36:57 +02:00
parent fbbc7df126
commit 23183a07b3

View File

@ -780,6 +780,11 @@ class YoutubeDL(object):
elif len(parts) == 1:
info_dict['url'] = parts[0]
success = self.fd._do_download(filename, info_dict)
else:
# We check if the final video has already been downloaded
if self.params.get('continuedl', False) and os.path.isfile(encodeFilename(filename)):
self.fd.report_file_already_downloaded(filename)
success = True
else:
parts_success = []
parts_files = []