diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-06 19:30:41 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-06 19:30:41 +0200 |
commit | 83e0d2c49dee1bc6e1263cbba37591c612a205dd (patch) | |
tree | d38bda5be1528489a44a7a46d4d4d25ea2aea4b4 /module/plugins/Plugin.py | |
parent | FilesonicCom API fix, New hoster FilefactoryCom (diff) | |
download | pyload-83e0d2c49dee1bc6e1263cbba37591c612a205dd.tar.xz |
easier implementation of free accounts
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 32e5e8d4d..4d8766250 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -90,7 +90,10 @@ class Plugin(object): self.ocr = None # captcha reader instance self.account = pyfile.m.core.accountManager.getAccountPlugin(self.__name__) # account handler instance + self.premium = False + self.user = None + if self.account and not self.account.canUse(): self.account = None if self.account: self.user, data = self.account.selectAccount() @@ -98,6 +101,7 @@ class Plugin(object): 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 + self.premium = self.account.isPremium(self.user) #premium status else: self.req = pyfile.m.core.requestFactory.getRequest(self.__name__) @@ -113,7 +117,6 @@ class Plugin(object): self.html = None #some plugins store html code here - #self.setup() self.init() def getChunkCount(self): @@ -129,7 +132,7 @@ class Plugin(object): pass def setup(self): - """ setup for enviroment and other things""" + """ setup for enviroment and other things, called before downloading (possibly more than one time)""" pass def preprocessing(self, thread): |