summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-12 17:45:40 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-12 17:45:40 +0100
commitddc6c0c15c132933e9676d563bad37288a3212f5 (patch)
treea5d6ecbcc4b96be9f8aead14262f3aa3ec69a5df /module/plugins
parentfixed progress when resuming (diff)
downloadpyload-ddc6c0c15c132933e9676d563bad37288a3212f5.tar.xz
universal progress (ex. unrar progress), link info now emits update event, updated .pot
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py3
-rw-r--r--module/plugins/hooks/UnRar.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 34c06539a..f2c3b18eb 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -101,7 +101,8 @@ class Plugin(object):
#self.req.canContinue = True
else:
self.req = pyfile.m.core.requestFactory.getRequest(self.__name__)
-
+ self.req.progressNotify = pyfile.progress.setValue
+
self.log = pyfile.m.core.log
self.pyfile = pyfile
diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py
index 46b9aac6a..fa762a832 100644
--- a/module/plugins/hooks/UnRar.py
+++ b/module/plugins/hooks/UnRar.py
@@ -119,8 +119,10 @@ class UnRar(Hook):
self.core.log.info(_("starting Unrar of %s") % fname)
pyfile = self.core.files.getFile(fid)
pyfile.setStatus("processing")
+ pyfile.progress.setRange(0, 100)
def s(p):
- pyfile.alternativePercent = p
+ pyfile.progress.setValue(p)
+
download_folder = self.core.config['general']['download_folder']
if self.core.config['general']['folder_per_package']:
@@ -165,7 +167,7 @@ class UnRar(Hook):
else:
self.core.log.info(_("Unrar of %s failed (wrong password)") % fname)
finally:
- pyfile.alternativePercent = None
+ pyfile.progress.setValue(100)
pyfile.setStatus("finished")
pyfile.release()