Fix missing cast preventing detection of already downloaded file
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Wed, 27 May 2009 21:02:37 +0000 (23:02 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:24:36 +0000 (11:24 +0100)
youtube-dl

index 591b7fc33f4f212335e33f3683695528e428f206..6afdc0e6a2bbfd2ddf350e3df08fa906687e536b 100755 (executable)
@@ -397,8 +397,8 @@ class FileDownloader(object):
                                raise
                        data = urllib2.urlopen(basic_request)
                        content_length = data.info()['Content-Length']
-                       if content_length is not None and content_length == resume_len:
-                               self.report_file_already_downloaded(self.name)
+                       if content_length is not None and long(content_length) == resume_len:
+                               self.report_file_already_downloaded(stream.name)
                                return
                        else:
                                self.report_unable_to_resume()