Fix IndexError in mobidedrm.py

This commit is contained in:
NoDRM 2022-01-04 16:56:02 +01:00
parent 5b3e3e420f
commit e54bb3f700
2 changed files with 4 additions and 2 deletions

View File

@ -55,4 +55,6 @@ List of changes since the fork of Apprentice Harper's repository:
- ineptpdf: Disable cross-reference streams in the output file. This may make PDFs slightly larger, but the current code for cross-reference streams seems to be buggy and sometimes creates corrupted PDFs.
- Drop support for importing key data from the ancient, pre "DeDRM" Calibre plugins ("Ignoble Epub DeDRM", "eReader PDB 2 PML" and "K4MobiDeDRM"). These are from 2011, I doubt anyone still has these installed, I can't even find a working link for these to test them. If you still have encryption keys in one of these plugins, you will need to update to DeDRM v10.0.2 or older (to convert the keys) before updating to DeDRM v10.0.3 or newer.
- Some Python3 bugfixes for Amazon books (merged #10 by ableeker).
- Fix a bug where extracting an Adobe key from ADE on Linux through Wine did fail when using the OpenSSL backend (instead of PyCrypto). See #13 and #14 for details, thanks acaloiaro for the bugfix.
- Fix a bug where extracting an Adobe key from ADE on Linux through Wine did fail when using the OpenSSL backend (instead of PyCrypto). See #13 and #14 for details, thanks acaloiaro for the bugfix.
- Make the plugin work on Calibre 6 (Qt 6). If you're running the Calibre 6 beta and you notice any issues, please open a bug report.
- Fix IndexError when DeDRMing some Amazon eBooks.

View File

@ -461,7 +461,7 @@ class MobiBook:
data406 = self.meta_array[406]
val406, = struct.unpack('>Q',data406)
if val406 != 0:
print("Warning: This is a library or rented ebook ({1}). Continuing ...".format(val406))
print("Warning: This is a library or rented ebook ({0}). Continuing ...".format(val406))
#raise DrmException("Cannot decode library or rented ebooks.")
goodpids = []