-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Lead: @cdriniIssues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Needs: Review AssigneeIssues that may have been abandoned by assigneesIssues that may have been abandoned by assigneesPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Theme: Trusted Book ProvidersType: Refactor/Clean-upIssues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]
Description
Currently we have a separate download option for each trusted book provider:
- openlibrary/templates/book_providers/librivox_download_options.html
- openlibrary/templates/book_providers/ia_download_options.html
- openlibrary/templates/book_providers/openstax_download_options.html
- and so on
Now that we have normalized AbstractBookProvider.get_acquisitions, we want to replace these with book_providers/download_options.html template, that simple renders the relevant acquisitions.
openlibrary/openlibrary/book_providers.py
Lines 276 to 283 in 406e767
| def get_acquisitions( | |
| self, | |
| ed_or_solr: Edition | dict, | |
| ) -> list[Acquisition]: | |
| if providers := ed_or_solr.get('providers', []): | |
| return [Acquisition.from_json(dict(p)) for p in providers] | |
| else: | |
| return [] |
Metadata
Metadata
Assignees
Labels
Lead: @cdriniIssues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Needs: Review AssigneeIssues that may have been abandoned by assigneesIssues that may have been abandoned by assigneesPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Theme: Trusted Book ProvidersType: Refactor/Clean-upIssues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]