From e2f481deb624709764768454f7cf8222b8b45af7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 15:23:30 +0200 Subject: [SimpleCrypter] Fix account association --- module/plugins/internal/SimpleCrypter.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'module/plugins') diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 73329ed65..fe644cbda 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -10,7 +10,7 @@ from module.utils import fixup, html_unescape class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = None @@ -63,6 +63,15 @@ class SimpleCrypter(Crypter): LOGIN_PREMIUM = False + def init(self): + self.account = self.core.accountManager.getAccountPlugin((self.__name__ + ".py").replace("Folder.py", "")) + + if self.account and self.account.canUse(): + self.user, data = self.account.selectAccount() + self.req = self.account.getAccountRequest(self.user) + self.premium = self.account.isPremium(self.user) + + def prepare(self): if self.LOGIN_ACCOUNT and not self.account: self.fail('Required account not found!') -- cgit v1.2.3