1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-18 14:10:30 +00:00

Adapt cover size to kobo sync requested sze

This commit is contained in:
Ozzie Isaacs 2023-08-08 19:21:47 +02:00
parent 3f6a12898b
commit 7818c4a7b0

View File

@ -930,7 +930,8 @@ def get_current_bookmark_response(current_bookmark):
@kobo.route("/<book_uuid>/<width>/<height>/<Quality>/<isGreyscale>/image.jpg") @kobo.route("/<book_uuid>/<width>/<height>/<Quality>/<isGreyscale>/image.jpg")
@requires_kobo_auth @requires_kobo_auth
def HandleCoverImageRequest(book_uuid, width, height, Quality, isGreyscale): def HandleCoverImageRequest(book_uuid, width, height, Quality, isGreyscale):
book_cover = helper.get_book_cover_with_uuid(book_uuid, resolution=COVER_THUMBNAIL_SMALL) resolution = None if height > 1000 else COVER_THUMBNAIL_SMALL
book_cover = helper.get_book_cover_with_uuid(book_uuid, resolution=resolution)
if book_cover: if book_cover:
log.debug("Serving local cover image of book %s" % book_uuid) log.debug("Serving local cover image of book %s" % book_uuid)
return book_cover return book_cover