summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-05 22:55:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-05 22:55:22 +0200
commit3e0bc9a0fb4dd6324e9764bc31f4686d672b70f4 (patch)
tree42265eeda90cbea3693ca28bc545afc630a2693b /module/plugins
parentchanged dl function for test purpose (diff)
downloadpyload-3e0bc9a0fb4dd6324e9764bc31f4686d672b70f4.tar.xz
general js api + pyv8 support
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py3
-rw-r--r--module/plugins/hoster/BasePlugin.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 04df13978..1568b0917 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -105,7 +105,8 @@ class Plugin(object):
self.pyfile = pyfile
self.thread = None # holds thread in future
- self.lastDownload = "" #location where the last call to download was saved
+ self.lastDownload = "" # location where the last call to download was saved
+ self.js = self.core.js # js engine
self.setup()
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 09545d493..4701f82ca 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -16,9 +16,9 @@ class BasePlugin(Hoster):
def process(self, pyfile):
"""main function"""
- if pyfile.url.startswith("http://"):
+ if pyfile.url.startswith("http"):
- pyfile.name = re.findall("([^\/=]+)", pyfile.url)[-1]
+ pyfile.name = re.findall("([^/=]+)", pyfile.url)[-1]
self.download(pyfile.url)
else: