diff options
| -rw-r--r-- | module/plugins/Plugin.py | 12 | ||||
| -rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 2 | 
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: | 
