internetarchive / internetarchive/openlibrary
OPDS Improvements
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
### Feature Request
### Problem / Opportunity
To enable a good OPDS, especially when merging many OPDS feeds, where buying and borrowing is possible and simple, there are a few improvements we need to address.
- [ ] Aggregate dynamic acquisition links.
- [ ] Expose manifest.json for Thorium Web
### Proposal
#### Aggregate OPDS publications with dynamic acquisition links
For a good UX, the Openlibrary OPDS feed should display the same publication from different sources as one. If not, multiple publications for the same work would be displayed, with different acquisition options in each one, causing a confusing experience to the patron.
While the publication metadata is mostly static, acquisition options for each publication vary between users. For example, if a user has bought a book, they should see a download/read link, and otherwise see a buy option. Same idea goes for lending. Since Openlibrary can't know this information, as it's not the one handling auth, Openlibrary can not show the correct acquisition links to the OPDS client. The OPDS client needs to communicate with the third-parties directly to receive that information.
Therefore, my proposal is that Openlibrary does not try to show all acquisition links in its OPDS feed. Instead, it shows a link to where the OPDS client can retrieve the up-to-date acquisition links. This is compatible with json-ld and would use the concept in it called [expansions](https://www.w3.org/TR/json-ld-api/#expansion). It has an added benefit that this makes it easier for the client to show the most up-to-date lending availability.
#### Expose manifest.json for Thorium web
Whenever possible, manifest.json should be exposed as an [acquisitionlink](https://drafts.opds.io/opds-2.0#53-acquisition-links). I need to check what the correct content-type is to return.
[Acquisition Links]: https://drafts.opds.io/opds-2.0#53-acquisition-links
### Breakdown
### Related files
Refer to [this map of common Endpoints](https://github.com/internetarchive/openlibrary/wiki/Endpoints):
*
### Requirements Checklist
Checklist of requirements that need to be satisfied in order for this issue to be closed:
* [ ]
### Stakeholders
*
### Instructions for Contributors
* **Before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) or pushing up changes to a PR, please first [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.
Contributor guide
Assessment
This issue has not been assessed yet.