fenimore / badreads

badreads replacement for goodreads (book tracking) 📚
GNU General Public License v3.0
50 stars 5 forks source link

Store book covers locally on the device #14

Open jeyca opened 2 years ago

jeyca commented 2 years ago

The app sometimes behaves like images are loaded from Internet, even after a book hast already been successfully added. Some books dont show the cover when my phone is offline, and some do update when the image is updated on openlibrary.org even when I did not trigger a reread or anything else.

fenimore commented 2 years ago

Hi! So, no the images are not stored on the phone, it caches the image requests (and they're really tiny files) so hopefully it doesn't refresh so often.

And also yes it is expected that when you update it on openlibrary, it updates on your phone

Lmk if you have other questions!

jeyca commented 2 years ago

but why aren't the images just stored on the device? its even from a privacy perspective a bad idea always to load them from the server, its even a bad user experience because of a small lagging. And I would not expect that images are just updated automatically when I already added a book, there should be an update button that I can trigger by myself, yes

fenimore commented 2 years ago

I'm not sure what the privacy issue is you're referring to. I don't track you in any way, nor does openlibrary. Your ISP will know the book covers you're loading, but they would know anyway when you search for the book.

amanharwara commented 2 years ago

Maybe store the covers on the phone and then only update them when the user clicks on a book?

fenimore commented 2 years ago

This seems possible, but there would be a lot of code to write to get there, bc currently i don't store any files on the user device (which i like) and so don't have to manage the cleaning up the data etc. But that could be implemented. Ideally i wouldnt want to store covers (one thumbnail and a larger) for books i want to read but won't open for a long time (i have hundreds of books in the to read shelf), so it'd probably only store recent covers or something.

I won't be able to implement something like this soon, but until then i can say that the images are cached, so at least the recent books that have been loaded should persist after turning off data.