From: Ricardo Garcia Date: Sat, 11 Dec 2010 10:32:13 +0000 (+0100) Subject: Do not use 0% as the starting point in resumed downloads (closes #40) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=106d091e80f609802d3f6dcc3512525458900042;p=youtube-dl Do not use 0% as the starting point in resumed downloads (closes #40) --- diff --git a/youtube-dl b/youtube-dl index a8e3bd36c..22b9eba17 100755 --- a/youtube-dl +++ b/youtube-dl @@ -606,8 +606,10 @@ class FileDownloader(object): return False data_len = data.info().get('Content-length', None) + if data_len is not None: + data_len = long(data_len) + resume_len data_len_str = self.format_bytes(data_len) - byte_counter = 0 + byte_counter = 0 + resume_len block_size = 1024 start = time.time() while True: