diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-05 13:16:31 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-05 13:16:31 +0200 |
commit | 869ea1524bede723e721b29a2b86a3ca66d5536f (patch) | |
tree | 82fa33395df09d1baedb379e9a833c880fd1159a /module/plugins/Plugin.py | |
parent | file version check, delete old configs! (diff) | |
download | pyload-869ea1524bede723e721b29a2b86a3ca66d5536f.tar.xz |
config parser fix, UploadedTo premium working
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 29fdebde8..a6ea7dee7 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -81,7 +81,10 @@ class Plugin(object): self.ocr = None # captcha reader instance self.account = pyfile.m.core.accountManager.getAccountPlugin(self.__name__) # account handler instance - self.req = pyfile.m.core.requestFactory.getRequest(self.__name__, self.account) + if self.account: + self.req = self.account.getAccountRequest(self) + else: + self.req = pyfile.m.core.requestFactory.getRequest(self.__name__) self.log = logging.getLogger("log") @@ -112,8 +115,11 @@ class Plugin(object): def process(self, pyfile): """the 'main' method of every plugin""" raise NotImplementedError - - + + def resetAccount(self): + self.account = None + self.req = self.core.requestFactory.getRequest(self.__name__) + def checksum(self, local_file=None): """ return codes: |