Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/opds_server/services/opds.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def generate_by_author_feed(page: int, config: Config) -> str:
author={"name": "Calibre OPDS Server"},
updated_time=updated_time,
links=(
f'<link type="application/atom+xml;profile=opds-catalog;kind=acquisition" '
f'<link rel="subsection" type="application/atom+xml;profile=opds-catalog;kind=acquisition" '
f'href="{xml_text(config.opds_path(f"author/{author_id}"))}"/>'
),
)
Expand Down
8 changes: 7 additions & 1 deletion tests/test_catalog_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ def test_author_navigation_detail_and_authorless_books(catalog_client):
readable."""
_, client = catalog_client
author_feed = parse_atom(client.get("/opds/by-author"))
detail_href = entries(author_feed)[0].find("atom:link", NS).get("href")
for entry in entries(author_feed):
author_links = links(entry, "subsection")
assert len(author_links) == 1
assert author_links[0].get("type") == (
"application/atom+xml;profile=opds-catalog;kind=acquisition"
)
detail_href = links(entries(author_feed)[0], "subsection")[0].get("href")
detail = parse_atom(client.get(detail_href))
assert detail.findtext("atom:title", namespaces=NS) == "Books by Ada & Sons"
assert {
Expand Down
Loading