From 8cd3523a1767ec6a4072270afb514c55b7163d04 Mon Sep 17 00:00:00 2001 From: NoDRM Date: Mon, 15 Nov 2021 13:59:20 +0100 Subject: [PATCH] Remove library book block --- DeDRM_plugin/kfxdedrm.py | 6 ++++-- DeDRM_plugin/mobidedrm.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/DeDRM_plugin/kfxdedrm.py b/DeDRM_plugin/kfxdedrm.py index 67b10f8..23e46dc 100644 --- a/DeDRM_plugin/kfxdedrm.py +++ b/DeDRM_plugin/kfxdedrm.py @@ -92,8 +92,10 @@ class KFXZipBook: license_type = voucher.getlicensetype() if license_type != "Purchase": - raise Exception(("This book is licensed as {0}. " - 'These tools are intended for use on purchased books.').format(license_type)) + #raise Exception(("This book is licensed as {0}. " + # 'These tools are intended for use on purchased books.').format(license_type)) + print("Warning: This book is licensed as {0}. " + "These tools are intended for use on purchased books. Continuing ...".format(license_type)) self.voucher = voucher diff --git a/DeDRM_plugin/mobidedrm.py b/DeDRM_plugin/mobidedrm.py index 79cd720..8f1d79d 100755 --- a/DeDRM_plugin/mobidedrm.py +++ b/DeDRM_plugin/mobidedrm.py @@ -446,7 +446,8 @@ class MobiBook: data406 = self.meta_array[406] val406, = struct.unpack('>Q',data406) if val406 != 0: - raise DrmException("Cannot decode library or rented ebooks.") + print("Warning: This is a library or rented ebook ({1}). Continuing ...".format(val406)) + #raise DrmException("Cannot decode library or rented ebooks.") goodpids = [] # print("DEBUG ==== pidlist = ", pidlist)