Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kobo] Performance issues with cover images #1347

Closed
shavitmichael opened this issue May 2, 2020 · 3 comments
Closed

[Kobo] Performance issues with cover images #1347

shavitmichael opened this issue May 2, 2020 · 3 comments

Comments

@shavitmichael
Copy link
Contributor

shavitmichael commented May 2, 2020

The Kobo device renders cover images downloaded from CalibreWeb quite slowly.
It can take up to about 5 seconds for my device to render just 5 cover images as I scroll through my book list.

Nickel helpfully logs the following warning for us:

performance.warning consider pre-scaling "d35af571-99ee-478a-9797-75d3a0621236" QSize(1280, 1920) vs. QSize(138, 216)

Updating the HandleCoverImageRequest endpoint to do just will probably resolve this issue.

(I haven't had much time to work on this project recently and this bug is low on my priority list. Mostly creating this for tracking purposes or if someone else is interested)

@OzzieIsaacs
Copy link
Collaborator

This is related to #742. I'd like to be compatile to Calibre (having "big covers"), so my idea so far was generating a local cover cache with "thumbnails" and present this pictures in Calibre-Web. This pictures also could be synced with Kobo

@ryujidanma
Copy link

I had this problem as well, even with wifi off the books didn't show any covers browsing my book list.

I have my calibre-web instance in a container behind traefik at https://domain.com/books and the /v1/initialization endpoint was returning:

{
  "Resources": {
    ...
    "image_host": "http://domain.com/books",
    "image_url_quality_template": "http://domain.com/books/kobo/.../{ImageId}/{width}/{height}/{Quality}/isGreyscale/image.jpg",
    "image_url_template": "http://domain.com/books/kobo/.../{ImageId}/{width}/{height}/false/image.jpg",
    ...
  }
}

So I've removed all books from my kobo and unarchived all of them in calibre-web (btw, the remove/archive works pretty neat) and changed the endpoint /v1/initialization response to:

{
  "Resources": {
    ...
    "image_host": "https://domain.com",
    "image_url_quality_template": "https://domain.com/books/kobo/.../{ImageId}/{width}/{height}/{Quality}/isGreyscale/image.jpg",
    "image_url_template": "https://domain.com/books/kobo/.../{ImageId}/{width}/{height}/false/image.jpg",
    ...
  }
}

Synced again and all covers were downloaded on sync and different sizes were added to .kobo-images folder. Now even with wifi turned off I can browse my book list with covers and I'm not getting the nickel warning.

I don't know if it was forcing the https or removing the path from ìmage_host, I'll do some more testing to find out.

@OzzieIsaacs
Copy link
Collaborator

There is a new feature for having thumbnails for the covers, they are used for the kobo sync. To enable the feature:

  • Please update to the newest nightly version
  • Install APScheduler via pip
  • Restart Calibre-Web
  • Go into admin section enter edit schedule task settings, enable "Generate Book Cover Thumbnails", change the regular update time if you want (only needed for sideloaded books via Calibre), save setting
  • go to admin section Click on Refresh Cover Thumbnnail cache
  • Check Tasks section and wait some minutes until all thumbnails are generated

Enjoy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants