summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui.py1
-rwxr-xr-xproxy.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/gui.py b/gui.py
index 423d1e3..441a1f2 100644
--- a/gui.py
+++ b/gui.py
@@ -30,6 +30,7 @@ class Settings(gtk.Window):
self.show_all()
def on_quit(self, widget):
+ print self.time_slice.get_value()
proxy.TIME_SLICE = self.time_slice.get_value()
self.destroy()
diff --git a/proxy.py b/proxy.py
index 0d50d67..5af4fd3 100755
--- a/proxy.py
+++ b/proxy.py
@@ -140,7 +140,7 @@ class MultipleProxyReader(object):
and self.fetch_pos + 1 < self.content_length and not self.channel.is_closed \
and len( filter( (lambda f: f.proxy == fetcher.proxy), self.fetchers) ) < 2:
#Start a new fetcher on this line if this fetchers is X-Bytes before finishing his jobs
- blocksize = min(int(TIME_SLICE * fetcher.speed()), MIN_BLOCKSIZE)
+ blocksize = max(int(TIME_SLICE * fetcher.speed()), MIN_BLOCKSIZE)
fetch_range = self.next_range(blocksize)
print "Start new Fetcher, bs=%s range=%s" % (blocksize,fetch_range)
self.fetchers.append( Fetcher(self, fetcher.proxy, self.url, self.header, fetch_range) )