summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-27 17:32:58 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-27 17:32:58 +0200
commite03e4b63cbcf37407c23d144e6d4c247be1f06b8 (patch)
tree6e6a20aad8f8ea3f4dc27189eaf7e96330d89e03 /module/plugins/hooks
parentsharerapid.com fix server response 401 (diff)
downloadpyload-e03e4b63cbcf37407c23d144e6d4c247be1f06b8.tar.xz
closed #411
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/ExternalScripts.py2
-rw-r--r--module/plugins/hooks/ExtractArchive.py9
2 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
index e8d929b71..2e77f1dae 100644
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -79,7 +79,7 @@ class ExternalScripts(Hook):
except Exception, e:
self.logError(_("Error in %(script)s: %(error)s") % { "script" :basename(script), "error": str(e)})
- def downloadStarts(self, pyfile):
+ def downloadPreparing(self, pyfile):
for script in self.scripts['download_preparing']:
self.callScript(script, pyfile.pluginname, pyfile.url, pyfile.id)
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 2e8daad35..54dd6ff2d 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -66,6 +66,9 @@ class WrongPassword(Exception):
class ExtractArchive(Hook):
+ """
+ Provides: unrarFinished (folder, filename)
+ """
__name__ = "ExtractArchive"
__version__ = "0.1"
__description__ = "Extract different kind of archives"
@@ -210,12 +213,12 @@ class ExtractArchive(Hook):
else:
self.logInfo(basename(plugin.file), _("Password protected"))
self.logDebug("Passwords: %s" % str(passwords))
-
+
pwlist = copy(self.getPasswords())
#remove already supplied pws from list (only local)
for pw in passwords:
if pw in pwlist: pwlist.remove(pw)
-
+
for pw in passwords + pwlist:
try:
self.logDebug("Try password: %s" % pw)
@@ -242,7 +245,7 @@ class ExtractArchive(Hook):
else: self.logDebug("%s does not exists" % f)
self.logInfo(basename(plugin.file), _("Extracting finished"))
- self.core.hookManager.unrarFinished(plugin.out, plugin.file)
+ self.manager.dispatchEvent("unrarFinished", plugin.out, plugin.file)
return plugin.getExtractedFiles()