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')))
Exemple #2
0
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()
Exemple #4
0
 def __init__(self, node):
     super(Subtitle, self).__init__(node)
     self._decrypter = SubtitleDecrypter()