shawnmclean / sovoli

https://sovoli.com
6 stars 0 forks source link

Bug: Google Books Images does not load from production domain #33

Open shawnmclean opened 1 day ago

shawnmclean commented 1 day ago

image

image

Request URL:
http://books.google.com/books/content?id=ZuKTvERuPG8C&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api
Referrer Policy:
strict-origin-when-cross-origin

The images loaded from google seemed to have stopped working.

However, when the url is loaded directly in the browser, it loads.

Also, most of these cover images are coming from google and not open library, we should dig into whether the books are not found on openlibrary.

shawnmclean commented 1 day ago

Looking into whether we should copy the image to our own bucket and what image quality to load, I found this discussion:

https://github.com/anpigon/obsidian-book-search-plugin/issues/48

One user ran into same issues I'm facing where there is inconsistencies in image qualities across platforms.

His suggestion is to have cover image a separate process, which is what I'm leaning towards now.

Since we are storing both the google id and open library id, we can create a new background worker that checks both platforms and pick out the best quality image and send it to our own bucket or just set that as the main cover image url.

Questions

  1. ChatGPT and Edge Copilot said its best to reference their image URLs directly instead of downloading the cover, but reading the terms were not clear on this.
  2. MediaAsset is tied to Knowledge, I don't want to reuse this for the book cover, so this would require additional database schema changes for media management. I'm not too keen on adding more complexity like this.