diff options
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index dc02cd056..bdd58da1b 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -129,19 +129,25 @@ class SimpleCrypter(Crypter): #@TODO: Remove in 0.4.10 - def _setup(self): - orig_name = self.classname - self.classname = orig_name.rstrip("Folder") - super(SimpleCrypter, self)._setup() - self.classname = orig_name + def setup_base(self): + class_name = self.classname.rsplit("Folder", 1)[0] + + if self.account: + self.req = self.pyload.requestFactory.getRequest(class_name, self.account.user) + self.premium = self.account.info['data']['premium'] #@NOTE: Avoid one unnecessary get_info call by `self.account.premium` here + else: + self.req = self.pyload.requestFactory.getRequest(class_name) + self.premium = False + + super(SimpleCrypter, self).setup_base() #@TODO: Remove in 0.4.10 def load_account(self): - orig_name = self.classname - self.classname = orig_name.rstrip("Folder") + class_name = self.classname + self.__class__.__name__ = class_name.rsplit("Folder", 1)[0] super(SimpleCrypter, self).load_account() - self.classname = orig_name + self.__class__.__name__ = class_name def handle_direct(self, pyfile): |