]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
YoutubeDL: remove method that came from FileDownloader
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 21 Oct 2013 11:52:24 +0000 (13:52 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 21 Oct 2013 11:52:24 +0000 (13:52 +0200)
youtube_dl/YoutubeDL.py

index 32f21e21afb91680a7157fc34d62da3a704bd5c3..a837971b0c7db8e19bc42e68fb177ecfc3e59b6f 100644 (file)
@@ -234,19 +234,6 @@ class YoutubeDL(object):
         error_message = u'%s %s' % (_msg_header, message)
         self.trouble(error_message, tb)
 
-    def slow_down(self, start_time, byte_counter):
-        """Sleep if the download speed is over the rate limit."""
-        rate_limit = self.params.get('ratelimit', None)
-        if rate_limit is None or byte_counter == 0:
-            return
-        now = time.time()
-        elapsed = now - start_time
-        if elapsed <= 0.0:
-            return
-        speed = float(byte_counter) / elapsed
-        if speed > rate_limit:
-            time.sleep((byte_counter - rate_limit * (now - start_time)) / rate_limit)
-
     def report_writedescription(self, descfn):
         """ Report that the description file is being written """
         self.to_screen(u'[info] Writing video description to: ' + descfn)