Remove library book block

This commit is contained in:
NoDRM 2021-11-15 13:59:20 +01:00
parent cc17d9cc59
commit 8cd3523a17
2 changed files with 6 additions and 3 deletions

View 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

View File

@ -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)