Remove option to disable webp
This commit is contained in:
parent
d02ae9dbb4
commit
cfe77a82c1
|
@ -51,11 +51,9 @@ def generate_thumbnail(filepath):
|
|||
|
||||
|
||||
class CalibreDB:
|
||||
def __init__(self, path='metadata.db', enable_webp=True, webp_quality=80, webp_method=0, webp_size=2048):
|
||||
def __init__(self, path='metadata.db', webp_quality=80, webp_method=0, webp_size=2048):
|
||||
self.database_path = f'file:{path}?mode=ro'
|
||||
|
||||
self.webp = enable_webp
|
||||
if self.webp is True:
|
||||
# lossy: 0-100 (used as quality)
|
||||
# lossless: 101-201 (101 subtracted and used as quality)
|
||||
if webp_quality > 100:
|
||||
|
@ -233,7 +231,7 @@ class CalibreDB:
|
|||
page_filename = zip_info.filename
|
||||
mimetype = mimetypes[os.path.splitext(page_filename)[1]]
|
||||
|
||||
if self.webp is True and mimetype != 'image/webp' and original is False:
|
||||
if original is False:
|
||||
mimetype = 'image/webp'
|
||||
|
||||
try:
|
||||
|
|
Reference in a new issue