Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a more detailed comment.
Browse files Browse the repository at this point in the history
jonathangreen committed Jun 18, 2024
1 parent c707399 commit b0e4462
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/palace/manager/core/opds2_import.py
Original file line number Diff line number Diff line change
@@ -689,6 +689,14 @@ def _extract_availability(
) -> bool:
"""Extract the publication's availability from its availability information.
We default to a publication being available if no availability information is provided or if the provided
availability information is past the time specified in its `until` field. The `since` field on the
availability information is not used, it is assumed to be informational and always in the past if it is
present. This is based on a discussion with the OPDS 2.0 working group.
TODO: Update our handling of the `since` field based on the resolution of the discussion here:
https://github.com/opds-community/drafts/discussions/63#discussioncomment-9806140
:return: Boolean value indicating whether the publication is available.
"""
available = opds2_ast.OPDS2AvailabilityType.AVAILABLE.value

0 comments on commit b0e4462

Please sign in to comment.