summaryrefslogtreecommitdiffstats
path: root/module/network/Request.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-xmodule/network/Request.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index 3a3cd0f41..5314f97ab 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -63,6 +63,7 @@ class Request:
self.isSlow = False
self.cookieJar = None
self.interface = interface
+ self.progressNotify = None
# change this for connection information
self.debug = False
@@ -379,6 +380,13 @@ class Request:
self.dl_arrived = int(dl_d)+self.offset
self.dl_size = int(dl_t)+self.offset
+ if self.progressNotify:
+ try:
+ progress = int(float(self.dl_arrived)/self.dl_size*100)
+ self.progressNotify(progress)
+ except:
+ pass
+
def get_free_name(self, folder, file_name):
file_count = 0
file_name = join(folder, file_name)