diff options
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/Plugin.py | 3 | ||||
-rw-r--r-- | module/plugins/hooks/UnRar.py | 6 |
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() |