From e54bb3f700a304a22d08bbabf153183027656c90 Mon Sep 17 00:00:00 2001 From: NoDRM Date: Tue, 4 Jan 2022 16:56:02 +0100 Subject: [PATCH] Fix IndexError in mobidedrm.py --- CHANGELOG.md | 4 +++- DeDRM_plugin/mobidedrm.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bca4f4..e4d9c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. \ No newline at end of file +- 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. diff --git a/DeDRM_plugin/mobidedrm.py b/DeDRM_plugin/mobidedrm.py index ec03fdb..843eebe 100755 --- a/DeDRM_plugin/mobidedrm.py +++ b/DeDRM_plugin/mobidedrm.py @@ -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 = []