From 6f5c0e4df6af2db41bfe05ff5bfe9d0e510a8255 Mon Sep 17 00:00:00 2001 From: mkaay Date: Tue, 1 Feb 2011 22:24:40 +0100 Subject: closes #226, #227 --- module/plugins/Plugin.py | 2 +- module/plugins/hooks/UnRar.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 0a1eba0ee..0cbccda74 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -231,7 +231,7 @@ class Plugin(object): def correctCaptcha(self): if self.ctresult: - self.self.ctresult.success() + self.ctresult.success() def decryptCaptcha(self, url, get={}, post={}, cookies=False, forceUser=False, imgtype="jpg"): """ loads the catpcha and decrypt it or ask the user for input """ diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py index 3647c763b..3a9e0b276 100644 --- a/module/plugins/hooks/UnRar.py +++ b/module/plugins/hooks/UnRar.py @@ -127,9 +127,9 @@ class UnRar(Hook): download_folder = self.core.config['general']['download_folder'] if self.core.config['general']['folder_per_package']: - destination = join(download_folder, pack.folder.decode(sys.getfilesystemencoding())) + folder = join(download_folder, pack.folder.decode(sys.getfilesystemencoding())) else: - destination = download_folder + folder = download_folder destination = None if self.getConfig("unrar_destination") and not self.getConfig("unrar_destination").lower() == "none": @@ -139,6 +139,8 @@ class UnRar(Hook): sub = pack.folder.decode(sys.getfilesystemencoding()) if not isabs(destination): destination = join(folder, destination, sub) + else: + destination = join(destination, sub) u = Unrar(join(folder, fname), tmpdir=join(folder, "tmp"), ramSize=(self.ram if self.getConfig("ramwarning") else 0), cpu=self.getConfig("renice")) try: -- cgit v1.2.3