scubajeff / lespas

Les Pas, photo album app for Nextcloud user
Apache License 2.0
446 stars 22 forks source link

Thumbnails for raw images are seemingly not cached #163

Closed allista closed 7 months ago

allista commented 7 months ago

Describe the bug I have several remote albums with raw images (Nikon nef format). Each time I open one, I see a lot of progress bars instead of the thumbnails, and it takes a lot of time until they are finally generated. Then, if I scroll down the album and back again, I also see progress bars. Worse still, if I open and close several albums in succession, all other albums and photos lose their thumbnails, and nothing is generated for a long time.

To Reproduce Steps to reproduce the behavior:

  1. Create several remote albums with 20-30 raw images
  2. Open and close them one by one
  3. Observer progress bars everywhere instead of thumbnails

Expected behavior Thumbnails are generated once and cached locally. Opening and closing of albums does not cause them to be regenerated.

Screenshots A video: https://photos.app.goo.gl/Rcsb6G3PqU7pS7Gm6

Smartphone (please complete the following information):

scubajeff commented 7 months ago

I don't recall exactly which setting, but there should be one in Preview Generator's config. Make sure you set it up so that your server creates thumbnail for those RAWs. Otherwise, Les Pas will download the whole image file before creating it locally.

allista commented 7 months ago

Yes, but shouldn't the locally created thumbnails remain in local cache? I'm not against some waiting on Les Pas side if it's not each time I open an album.

I'll try to re-configure preview generator in the meantime.

scubajeff commented 7 months ago

Caching for remote image and thumbnail is totally depends on underlaying network library okhttp.