From 7818c4a7b0f6ca133c04185bd3c520e6bca7d6ba Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Tue, 8 Aug 2023 19:21:47 +0200 Subject: [PATCH] Adapt cover size to kobo sync requested sze --- cps/kobo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/kobo.py b/cps/kobo.py index dfda6483..c8fecd1c 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -930,7 +930,8 @@ def get_current_bookmark_response(current_bookmark): @kobo.route("//////image.jpg") @requires_kobo_auth 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: log.debug("Serving local cover image of book %s" % book_uuid) return book_cover