1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-25 12:27:39 +00:00

Fix #1255 (support webp in comic viewer)

This commit is contained in:
andylizi
2020-12-17 23:53:24 +08:00
parent 376214e2d2
commit 123493ee59
2 changed files with 20 additions and 5 deletions

View File

@@ -560,7 +560,7 @@ def get_comic_book(book_id, book_format, page):
else:
b64 = extract(page).encode('base64')
ext = names[page].rpartition('.')[-1]
if ext not in ('png', 'gif', 'jpg', 'jpeg'):
if ext not in ('png', 'gif', 'jpg', 'jpeg', 'webp'):
ext = 'png'
extractedfile="data:image/" + ext + ";base64," + b64
fileData={"name": names[page], "page":page, "last":len(names)-1, "content": extractedfile}