Bugfix for Nook PDFs?
This commit is contained in:
parent
e4fe032e47
commit
7eb8f07a33
|
@ -1601,7 +1601,12 @@ class PDFDocument(object):
|
||||||
|
|
||||||
def initialize_ebx_ignoble(self, keyb64, docid, param):
|
def initialize_ebx_ignoble(self, keyb64, docid, param):
|
||||||
self.is_printable = self.is_modifiable = self.is_extractable = True
|
self.is_printable = self.is_modifiable = self.is_extractable = True
|
||||||
|
try:
|
||||||
key = keyb64.decode('base64')[:16]
|
key = keyb64.decode('base64')[:16]
|
||||||
|
# This will probably always error, but I'm not 100% sure, so lets leave the old code in.
|
||||||
|
except AttributeError:
|
||||||
|
key = codecs.decode(keyb64.encode("ascii"), 'base64')[:16]
|
||||||
|
|
||||||
length = int_value(param.get('Length', 0)) / 8
|
length = int_value(param.get('Length', 0)) / 8
|
||||||
rights = str_value(param.get('ADEPT_LICENSE')).decode('base64')
|
rights = str_value(param.get('ADEPT_LICENSE')).decode('base64')
|
||||||
rights = zlib.decompress(rights, -15)
|
rights = zlib.decompress(rights, -15)
|
||||||
|
|
|
@ -77,7 +77,7 @@ def WineGetKeys(scriptpath, extension, wineprefix=""):
|
||||||
pyexec = WinePythonCLI(wineprefix)
|
pyexec = WinePythonCLI(wineprefix)
|
||||||
except NoWinePython3Exception:
|
except NoWinePython3Exception:
|
||||||
print('{0} v{1}: Unable to find python3 executable in WINEPREFIX="{2}"'.format(PLUGIN_NAME, PLUGIN_VERSION, wineprefix))
|
print('{0} v{1}: Unable to find python3 executable in WINEPREFIX="{2}"'.format(PLUGIN_NAME, PLUGIN_VERSION, wineprefix))
|
||||||
return []
|
return [], []
|
||||||
|
|
||||||
basepath, script = os.path.split(scriptpath)
|
basepath, script = os.path.split(scriptpath)
|
||||||
print("{0} v{1}: Running {2} under Wine".format(PLUGIN_NAME, PLUGIN_VERSION, script))
|
print("{0} v{1}: Running {2} under Wine".format(PLUGIN_NAME, PLUGIN_VERSION, script))
|
||||||
|
|
Loading…
Reference in New Issue