From b9cd4eb41e9b8753bca4b5a8334d7242eab98371 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 17:44:49 +0200 Subject: [SimpleCrypter] Fix account routine --- module/plugins/internal/SimpleCrypter.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'module') diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index fe644cbda..3c1dc3244 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.14" + __version__ = "0.15" __pattern__ = None @@ -64,12 +64,15 @@ class SimpleCrypter(Crypter): def init(self): - self.account = self.core.accountManager.getAccountPlugin((self.__name__ + ".py").replace("Folder.py", "")) + account_name = (self.__name__ + ".py").replace("Folder.py", "").replace(".py", "") + account = self.core.accountManager.getAccountPlugin(account_name) - 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) + if account and account.canUse(): + self.user, data = account.selectAccount() + self.req = account.getAccountRequest(self.user) + self.premium = account.isPremium(self.user) + + self.account = account def prepare(self): -- cgit v1.2.3