]> xmof Git - DeDRM.git/commitdiff
Remove library book block
authorNoDRM <no_drm123@protonmail.com>
Mon, 15 Nov 2021 12:59:20 +0000 (13:59 +0100)
committerNoDRM <no_drm123@protonmail.com>
Mon, 15 Nov 2021 12:59:20 +0000 (13:59 +0100)
DeDRM_plugin/kfxdedrm.py
DeDRM_plugin/mobidedrm.py

index 67b10f8c2621f35e66dfa3b1da04309bb6b352dc..23e46dc77b2a84597dce571bacf1dca9c316687e 100644 (file)
@@ -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
 
index 79cd72047c2b9f44cc35bf170d4817f4860ccbb7..8f1d79d321eed2ae893afc575d41e4c28aecf7a7 100755 (executable)
@@ -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)