From ddc6c0c15c132933e9676d563bad37288a3212f5 Mon Sep 17 00:00:00 2001 From: mkaay Date: Sun, 12 Dec 2010 17:45:40 +0100 Subject: universal progress (ex. unrar progress), link info now emits update event, updated .pot --- module/plugins/Plugin.py | 3 ++- module/plugins/hooks/UnRar.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'module/plugins') 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() -- cgit v1.2.3