class Subtitle(XmlModel): def __init__(self, node): super(Subtitle, self).__init__(node) self._decrypter = SubtitleDecrypter() def decrypt(self): return StyledSubtitle(self._decrypter.decrypt( self._decrypter._build_encryption_key(int(self.id)), self['iv'][0].text.decode('base64'), self['data'][0].text.decode('base64')))
class Subtitle(XmlModel): def __init__(self, node): super(Subtitle, self).__init__(node) self._decrypter = SubtitleDecrypter() def decrypt(self): return StyledSubtitle(self._decrypter.decrypt( self._decrypter._build_encryption_key(int(self.id)), base64.b64decode(self['iv'][0].text), base64.b64decode(self['data'][0].text)))
def __init__(self, node): super(Subtitle, self).__init__(node) self._decrypter = SubtitleDecrypter()