summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-14 22:26:27 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-14 22:26:27 +0100
commitbd794c16ddb75814a47261c4cac8a249d552cae7 (patch)
tree356100bd4dcedd8ed4b9ced65d16e8762395a262 /module
parentclosed #264 (diff)
downloadpyload-bd794c16ddb75814a47261c4cac8a249d552cae7.tar.xz
closed #147
Diffstat (limited to 'module')
-rw-r--r--module/plugins/Plugin.py12
-rw-r--r--module/plugins/hoster/MegauploadCom.py2
2 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index dcc51c516..1bac92e55 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -97,6 +97,7 @@ class Plugin(object):
self.req = self.account.getAccountRequest(self.user)
self.chunkLimit = -1 #enable chunks for all premium plugins
self.resumeDownload = True #also enable resume (both will be ignored if server dont accept chunks)
+ self.multiDL = True #every hoster with account should provides multiple downloads
else:
self.req = pyfile.m.core.requestFactory.getRequest(self.__name__)
@@ -113,6 +114,7 @@ class Plugin(object):
self.html = None #some plugins store html code here
#self.setup()
+ self.init()
def getChunkCount(self):
if self.chunkLimit <= 0:
@@ -122,17 +124,19 @@ class Plugin(object):
def __call__(self):
return self.__name__
- def setup(self):
+ def init(self):
""" more init stuff if needed """
pass
+ def setup(self):
+ """ setup for enviroment and other things"""
+ pass
+
def preprocessing(self, thread):
""" handles important things to do before starting """
self.thread = thread
- if self.account:
- self.multiDL = True #every hoster with account should provides multiple downloads
- else:
+ if not self.account:
self.req.clearCookies()
self.setup()
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index ed26bb0a1..9158e929e 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -56,7 +56,7 @@ class MegauploadCom(Hoster):
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
- def setup(self):
+ def init(self):
self.html = [None, None]
if self.account: