gotson / komga

Media server for comics/mangas/BDs/magazines/eBooks with API and OPDS support
https://komga.org
MIT License
3.79k stars 223 forks source link

[OPDS] Supply thumbnail URL for collections and read lists #1092

Closed GsMumbo closed 1 year ago

GsMumbo commented 1 year ago

Describe your suggested feature

OPDS supports sending a thumbnail image for collection items. While Komga does a great job sending a thumbnail for Series, it doesn't currently send any for Collections or Reading Lists.

Both of these already support custom covers in the frontend, this would just encompass passing along that image to OPDS. For Collections / Reading Lists without a custom cover, Komga could either serve a generic thumbnail, no thumbnail, or a generated 4-cover thumbnail that matches what the frontend already shows.

Custom covers in Komga Frontend

CleanShot 2023-03-14 at 12 57 21@2x

OPDS feed showing thumbnails for series IMG_5831

OPDS feed without thumbails for Collections and Reading Lists IMG_5832

IMG_5833

Other details

Related conversation on the Panels app community forums:

https://community.panels.app/t/feature-request-collection-images-from-komga/1730/2?u=gsmumbo

Acknowledgements

gotson commented 1 year ago

OPDS supports sending a thumbnail image for collection items. While Komga does a great job sending a thumbnail for Series, it doesn't currently send any for Collections or Reading Lists.

OPDS doesn't support thumbnails for folders, only for acquisition items (ie books).

Panels uses the Komga API to retrieve the Series thumbnails. They could do the same thing for collections/readlists.

fillito commented 1 year ago

Sorry for the confusion. My bad 🤦 I forgot I implemented that and thought we were getting it from the feed. We are indeed inferring the thumbnail API endpoint using the feed identifier. We'll do the same for collections/readlists. 👍

@gotson I have a question, though. I double-checked the OPDS 1.2 specs regarding artworks, and I think any entry can have it. The acquisition relation is not required. Let me know if I'm missing something 🤔

gotson commented 1 year ago

@gotson I have a question, though. I double-checked the OPDS 1.2 specs regarding artworks, and I think any entry can have it. The acquisition relation is not required. Let me know if I'm missing something 🤔

Section 5 mentions:

OPDS Catalog Entry Documents are Atom [RFC4287] Entry documents that provide a complete representation of the metadata and data associated with an available Publication.

Each OPDS Catalog Entry Document must include at least one Acquisition Link.

My understanding is that "folders" (whatever they are, series/collections/readlists) are not catalog entries, because they do not represent "a Publication", and they do not include an "Acquisition Link", but instead a "Navigation Link".

Section 2.2 mentions:

A Navigation Feed is an OPDS Catalog Feed Document whose Atom Entries serve to create a suggested hierarchy for presentation and browsing. A Navigation Feed must not contain OPDS Catalog Entries but instead contains Atom Entries that link to other Navigation or Acquisition Feeds or other Resources.

The <entry> elements are not to be confused with an OPDS Catalog Entry. It is an Atom Entry.


I wanted to try it with the OPDS validator, but it's down at the moment :(

fillito commented 1 year ago

Thanks for clarifying 🙌 It makes total sense. I'm still learning OPDS 😅

The elements are not to be confused with an OPDS Catalog Entry. It is an Atom Entry.

This is what confused me. I assumed they were equivalent.

Thanks for taking the time to write such a detailed explanation 🖤💯

gotson commented 1 year ago

it's really confusing i have to admit, i had to re-read the whole thing to make sure i understood correctly ! It's too bad it's not supported though :(

gotson commented 1 year ago

@fillito since we started talking about OPDS 2.0 in the anansi project for OPDS-PSE, it might be worth raising this request in https://github.com/opds-community/drafts/issues

fillito commented 1 year ago

Thanks for the callout!

Done! https://github.com/opds-community/drafts/issues/64